mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Get rid of 'file' built-in. Get rid of types.StringType and friends.
This commit is contained in:
parent
317e774965
commit
74302dbd3c
3 changed files with 0 additions and 15 deletions
12
Lib/types.py
12
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue