From 1f05708f69bb90d2892b4e5c9521b19c1574c6b1 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 19 Dec 1998 23:53:33 +0000 Subject: Use __stdin__ instead of stdin to derive FileType -- safer against assignments. --- Lib/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v0.12