mirror of
https://github.com/python/cpython.git
synced 2025-09-20 07:31:10 +00:00
Removed more types from the types module
This commit is contained in:
parent
043c8f866d
commit
0db38532b3
3 changed files with 3 additions and 9 deletions
|
@ -85,11 +85,6 @@ The module defines the following names:
|
||||||
traceback object.
|
traceback object.
|
||||||
|
|
||||||
|
|
||||||
.. data:: DictProxyType
|
|
||||||
|
|
||||||
The type of dict proxies, such as ``type.__dict__``.
|
|
||||||
|
|
||||||
|
|
||||||
.. data:: GetSetDescriptorType
|
.. data:: GetSetDescriptorType
|
||||||
|
|
||||||
The type of objects defined in extension modules with ``PyGetSetDef``, such as
|
The type of objects defined in extension modules with ``PyGetSetDef``, such as
|
||||||
|
|
|
@ -18,7 +18,7 @@ __all__ = ["Hashable", "Iterable", "Iterator",
|
||||||
"Sequence", "MutableSequence",
|
"Sequence", "MutableSequence",
|
||||||
"ByteString",
|
"ByteString",
|
||||||
"bytearray_iterator", "bytes_iterator", "dict_itemiterator",
|
"bytearray_iterator", "bytes_iterator", "dict_itemiterator",
|
||||||
"dict_items", "dict_keyiterator", "dict_keys",
|
"dict_items", "dict_keyiterator", "dict_keys", "dict_proxy",
|
||||||
"dict_valueiterator", "dict_values", "list_iterator",
|
"dict_valueiterator", "dict_values", "list_iterator",
|
||||||
"list_reverseiterator", "range_iterator", "set_iterator",
|
"list_reverseiterator", "range_iterator", "set_iterator",
|
||||||
"str_iterator", "tuple_iterator", "zip_iterator",
|
"str_iterator", "tuple_iterator", "zip_iterator",
|
||||||
|
@ -44,6 +44,8 @@ zip_iterator = type(iter(zip()))
|
||||||
dict_keys = type({}.keys())
|
dict_keys = type({}.keys())
|
||||||
dict_values = type({}.values())
|
dict_values = type({}.values())
|
||||||
dict_items = type({}.items())
|
dict_items = type({}.items())
|
||||||
|
## misc ##
|
||||||
|
dict_proxy = type(type.__dict__)
|
||||||
|
|
||||||
|
|
||||||
### ONE-TRICK PONIES ###
|
### ONE-TRICK PONIES ###
|
||||||
|
|
|
@ -20,7 +20,6 @@ GeneratorType = type(_g())
|
||||||
|
|
||||||
class _C:
|
class _C:
|
||||||
def _m(self): pass
|
def _m(self): pass
|
||||||
ClassType = type
|
|
||||||
MethodType = type(_C()._m)
|
MethodType = type(_C()._m)
|
||||||
|
|
||||||
BuiltinFunctionType = type(len)
|
BuiltinFunctionType = type(len)
|
||||||
|
@ -36,8 +35,6 @@ except TypeError:
|
||||||
FrameType = type(tb.tb_frame)
|
FrameType = type(tb.tb_frame)
|
||||||
tb = None; del tb
|
tb = None; del tb
|
||||||
|
|
||||||
DictProxyType = type(type.__dict__)
|
|
||||||
|
|
||||||
# Extension types defined in a C helper module. XXX There may be no
|
# Extension types defined in a C helper module. XXX There may be no
|
||||||
# equivalent in implementations other than CPython, so it seems better to
|
# equivalent in implementations other than CPython, so it seems better to
|
||||||
# leave them undefined then to set them to e.g. None.
|
# leave them undefined then to set them to e.g. None.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue