]> granicus.if.org Git - python/commitdiff
Use __stdin__ instead of stdin to derive FileType -- safer against
authorGuido van Rossum <guido@python.org>
Sat, 19 Dec 1998 23:53:33 +0000 (23:53 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 19 Dec 1998 23:53:33 +0000 (23:53 +0000)
assignments.

Lib/types.py

index c440a5cdf7709f98d9d9bd9375f68bf8fa0abd7c..70e624a09169847b9c8045a24fedc31cf9ea8866 100644 (file)
@@ -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))