mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Removed the new module
Removed a lot of types from the 'types' module that are available through builtins.
This commit is contained in:
parent
ceee0773d2
commit
c9543e4233
10 changed files with 18 additions and 198 deletions
23
Lib/types.py
23
Lib/types.py
|
@ -9,23 +9,6 @@ import sys
|
|||
# iterator. Don't check the type! Use hasattr to check for both
|
||||
# "__iter__" and "__next__" attributes instead.
|
||||
|
||||
NoneType = type(None)
|
||||
TypeType = type
|
||||
ObjectType = object
|
||||
|
||||
IntType = int
|
||||
LongType = int
|
||||
FloatType = float
|
||||
BooleanType = bool
|
||||
try:
|
||||
ComplexType = complex
|
||||
except NameError:
|
||||
pass
|
||||
|
||||
TupleType = tuple
|
||||
ListType = list
|
||||
DictType = DictionaryType = dict
|
||||
|
||||
def _f(): pass
|
||||
FunctionType = type(_f)
|
||||
LambdaType = type(lambda: None) # Same as FunctionType
|
||||
|
@ -53,11 +36,7 @@ except TypeError:
|
|||
FrameType = type(tb.tb_frame)
|
||||
tb = None; del tb
|
||||
|
||||
SliceType = slice
|
||||
EllipsisType = type(Ellipsis)
|
||||
|
||||
DictProxyType = type(TypeType.__dict__)
|
||||
NotImplementedType = type(NotImplemented)
|
||||
DictProxyType = type(type.__dict__)
|
||||
|
||||
# Extension types defined in a C helper module. XXX There may be no
|
||||
# equivalent in implementations other than CPython, so it seems better to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue