python的types模块
1.types是什么:
- types模块中包含python中各种常见的数据类型,如IntType(整型),FloatType(浮点型)等等。
>>> import types
>>> dir(types)
['BooleanType',
'BufferType',
'BuiltinFunctionType',
'BuiltinMethodType',
'ClassType',
'CodeType',
'ComplexType',
'DictProxyType',
'DictType',
'DictionaryType',
'EllipsisType',
'FileType',
'FloatType',
'FrameType',
'FunctionType',
'GeneratorType',
'GetSetDescriptorType',
'InstanceType',
'IntType',
'LambdaType',
'ListType',
'LongType',
'MemberDescriptorType',
'MethodType',
'ModuleType',
'NoneType',
'NotImplementedType',
'ObjectType',
'SliceType',
'StringType',
'StringTypes',
'