summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-12-19 23:53:33 (GMT)
committerGuido van Rossum <guido@python.org>1998-12-19 23:53:33 (GMT)
commit1f05708f69bb90d2892b4e5c9521b19c1574c6b1 (patch)
treedc5ae1b1f50520c7ed606d71706ae7882cd35f2e
parent1190ee3d033eac619c06fb0feb6e2a4e5ebce078 (diff)
downloadcpython-1f05708f69bb90d2892b4e5c9521b19c1574c6b1.zip
cpython-1f05708f69bb90d2892b4e5c9521b19c1574c6b1.tar.gz
cpython-1f05708f69bb90d2892b4e5c9521b19c1574c6b1.tar.bz2
Use __stdin__ instead of stdin to derive FileType -- safer against
assignments.
-rw-r--r--Lib/types.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/types.py b/Lib/types.py
index c440a5c..70e624a 100644
--- a/Lib/types.py
+++ b/Lib/types.py
@@ -42,7 +42,7 @@ BuiltinMethodType = type([].append) # Same as BuiltinFunctionType
ModuleType = type(sys)
try:
- FileType = type(sys.stdin) # XXX what if it was assigned to?
+ FileType = type(sys.__stdin__)
except:
pass
XRangeType = type(xrange(0))