commit | 1f05708f69bb90d2892b4e5c9521b19c1574c6b1 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Sat Dec 19 23:53:33 1998 +0000 |
committer | Guido van Rossum <guido@python.org> | Sat Dec 19 23:53:33 1998 +0000 |
tree | dc5ae1b1f50520c7ed606d71706ae7882cd35f2e | |
parent | 1190ee3d033eac619c06fb0feb6e2a4e5ebce078 [diff] [blame] |
Use __stdin__ instead of stdin to derive FileType -- safer against assignments.
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 @@ 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))