really the last log entry for 1.1
[python/dscho.git] / Lib / types.py
blob56dec040e7355c3f2990a6ffb58a801b36e0d281
1 # Define names for all type symbols known in the standard interpreter.
2 # Types that are part of optional modules (e.g. array) are not listed.
4 import sys
6 NoneType = type(None)
7 TypeType = type(NoneType)
9 IntType = type(0)
10 LongType = type(0L)
11 FloatType = type(0.0)
13 StringType = type('')
15 TupleType = type(())
16 ListType = type([])
17 DictionaryType = type({})
19 def _f(): pass
20 FunctionType = type(_f)
21 LambdaType = type(lambda: None) # Same as FunctionType
22 CodeType = type(_f.func_code)
24 class _C:
25 def _m(self): pass
26 ClassType = type(_C)
27 UnboundMethodType = type(_C._m) # Same as MethodType
28 _x = _C()
29 InstanceType = type(_x)
30 MethodType = type(_x._m)
32 BuiltinFunctionType = type(len)
33 BuiltinMethodType = type([].append) # Same as BuiltinFunctionType
35 ModuleType = type(sys)
37 FileType = type(sys.stdin) # XXX what if it was assigned to?
38 XRangeType = type(xrange(0))
40 try:
41 raise TypeError
42 except TypeError:
43 TracebackType = type(sys.exc_traceback)
44 FrameType = type(sys.exc_traceback.tb_frame)
46 del sys, _f, _C, _x # Not for export