summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-08 17:20:32 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-08 17:20:32 (GMT)
commit74302dbd3cfd10aa3139f27644740ac6ca77cbd7 (patch)
tree90e3712f2dd6730c50a0fddcbf8d83d0e7e7eefd /Lib
parent317e7749656548f629cb9a1c0a01e31b518ff2ff (diff)
downloadcpython-74302dbd3cfd10aa3139f27644740ac6ca77cbd7.zip
cpython-74302dbd3cfd10aa3139f27644740ac6ca77cbd7.tar.gz
cpython-74302dbd3cfd10aa3139f27644740ac6ca77cbd7.tar.bz2
Get rid of 'file' built-in. Get rid of types.StringType and friends.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/site.py2
-rw-r--r--Lib/types.py12
2 files changed, 0 insertions, 14 deletions
diff --git a/Lib/site.py b/Lib/site.py
index c4e0d51..ba8603c 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -414,9 +414,7 @@ def installnewio():
def __new__(cls, *args, **kwds):
return io.open(*args, **kwds)
__builtin__.classic_open = __builtin__.open
- __builtin__.classic_file = __builtin__.file
__builtin__.open = open
- __builtin__.file = open
sys.stdin = io.open(0, "r")
sys.stdout = io.open(1, "w")
sys.stderr = io.open(2, "w")
diff --git a/Lib/types.py b/Lib/types.py
index 3c1c939..1d90012 100644
--- a/Lib/types.py
+++ b/Lib/types.py
@@ -22,17 +22,6 @@ try:
except NameError:
pass
-StringType = str
-
-# StringTypes is already outdated. Instead of writing "type(x) in
-# types.StringTypes", you should use "isinstance(x, basestring)". But
-# we keep around for compatibility with Python 2.2.
-try:
- UnicodeType = str
- StringTypes = (StringType, UnicodeType)
-except NameError:
- StringTypes = (StringType,)
-
BufferType = buffer
TupleType = tuple
@@ -62,7 +51,6 @@ BuiltinFunctionType = type(len)
BuiltinMethodType = type([].append) # Same as BuiltinFunctionType
ModuleType = type(sys)
-FileType = file
try:
raise TypeError