Types
The types module contains names for each built-in type. An object’s type can be queried with the type() function. Each value is an integer that represents the internal type code for an object; these integer representations are as follows:
- NoneType = 0
- IntType = 1
- FloatType = 2
- StringType = 3
- TupleType = 4
- _PackTupleType = 5
- BooleanType = 6
- CodeType = 8
- _PackCodeType = 9
- ModuleType = 21
- ClassType = 22
- FunctionType = 23
- _ClassInstanceType = 24
- NativeCodeType = 25
- ForeignType = 26
- ThreadType = 27
- MethodType = 29
- ListType = 40
- DictType = 41
- XRangeType = 42
- SetType = 43
- _FrameType = 52
- _BlockType = 53
- _SegmentType = 54
- _SegListType = 55
- _SeqIterType = 56
- _ProfType = 63