Author: guido.van.rossum
Date: Tue May 8 19:20:32 2007
New Revision: 55185
Modified:
python/branches/py3k-struni/Lib/site.py
python/branches/py3k-struni/Lib/types.py
python/branches/py3k-struni/Python/bltinmodule.c
Log:
Get rid of 'file' built-in. Get rid of types.StringType and friends.
Modified: python/branches/py3k-struni/Lib/site.py
==============================================================================
--- python/branches/py3k-struni/Lib/site.py (original)
+++ python/branches/py3k-struni/Lib/site.py Tue May 8 19:20:32 2007
@@ -414,9 +414,7 @@
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")
Modified: python/branches/py3k-struni/Lib/types.py
==============================================================================
--- python/branches/py3k-struni/Lib/types.py (original)
+++ python/branches/py3k-struni/Lib/types.py Tue May 8 19:20:32 2007
@@ -22,17 +22,6 @@
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 @@
BuiltinMethodType = type([].append) # Same as BuiltinFunctionType
ModuleType = type(sys)
-FileType = file
try:
raise TypeError
Modified: python/branches/py3k-struni/Python/bltinmodule.c
==============================================================================
--- python/branches/py3k-struni/Python/bltinmodule.c (original)
+++ python/branches/py3k-struni/Python/bltinmodule.c Tue May 8 19:20:32 2007
@@ -2040,7 +2040,6 @@
#endif
SETBUILTIN("dict", &PyDict_Type);
SETBUILTIN("enumerate", &PyEnum_Type);
- SETBUILTIN("file", &PyFile_Type);
SETBUILTIN("float", &PyFloat_Type);
SETBUILTIN("frozenset", &PyFrozenSet_Type);
SETBUILTIN("property", &PyProperty_Type);
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins