diff options
author | Guido van Rossum <guido@python.org> | 1998-12-19 23:53:33 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-12-19 23:53:33 (GMT) |
commit | 1f05708f69bb90d2892b4e5c9521b19c1574c6b1 (patch) | |
tree | dc5ae1b1f50520c7ed606d71706ae7882cd35f2e /Lib | |
parent | 1190ee3d033eac619c06fb0feb6e2a4e5ebce078 (diff) | |
download | cpython-1f05708f69bb90d2892b4e5c9521b19c1574c6b1.zip cpython-1f05708f69bb90d2892b4e5c9521b19c1574c6b1.tar.gz cpython-1f05708f69bb90d2892b4e5c9521b19c1574c6b1.tar.bz2 |
Use __stdin__ instead of stdin to derive FileType -- safer against
assignments.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/types.py | 2 |
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)) |