1 """Define names for all type symbols known in the standard interpreter.
3 Types that are part of optional modules (e.g. array) are not listed.
5 from __future__
import generators
23 BufferType
= type(buffer(''))
27 DictType
= DictionaryType
= dictionary
30 FunctionType
= type(_f
)
31 LambdaType
= type(lambda: None) # Same as FunctionType
33 CodeType
= type(_f
.func_code
)
35 # Execution in restricted environment
40 GeneratorType
= type(g())
46 UnboundMethodType
= type(_C
._m
) # Same as MethodType
48 InstanceType
= type(_x
)
49 MethodType
= type(_x
._m
)
51 BuiltinFunctionType
= type(len)
52 BuiltinMethodType
= type([].append
) # Same as BuiltinFunctionType
54 ModuleType
= type(sys
)
57 FileType
= type(sys
.__stdin
__)
58 except AttributeError:
59 # Not available in restricted mode
61 XRangeType
= type(xrange(0))
67 tb
= sys
.exc_info()[2]
68 TracebackType
= type(tb
)
69 FrameType
= type(tb
.tb_frame
)
70 except AttributeError:
71 # In the restricted environment, exc_info returns (None, None,
72 # None) Then, tb.tb_frame gives an attribute error
76 SliceType
= type(slice(0))
77 EllipsisType
= type(Ellipsis)
79 DictIterType
= type(iter({}))
80 SequenceIterType
= type(iter([]))
81 FunctionIterType
= type(iter(lambda: 0, 0))
82 DictProxyType
= type(TypeType
.__dict
__)
84 del sys
, _f
, _C
, _x
# Not for export