types the types module defines names for the built-in types that correspond to functionsmodulesgeneratorsstack framesand other program elements the contents of this module are often used in conjunction with the built-in isinstance(function and other type-related operations variable description builtinfunctiontype codetype frametype functiontype generatortype getsetdescriptortype lambdatype memberdescriptortype methodtype moduletype tracebacktype type of built-in functions type of code objects type of execution frame object type of user-defined functions and lambdas type of generator-iterator objects type of getset descriptor objects alternative name for functiontype type of member descriptor objects type of user-defined class methods type of modules type of traceback objects most of the preceding type objects serve as constructors that can be used to create an object of that type the following descriptions provide the parameters used to create functionsmodulescode objectsand methods contains detailed information about the attributes of the objects created and the arguments that need to be supplied to the functions described next functiontype(codeglobals [name [defarags [closure]]]creates new function object codetype(argcountnlocalsstacksizeflagscodestringconstantsnamesvarnamesfilenamenamefirstlinenolnotab [freevars [cellvars ]]creates new code object methodtype(functioninstanceclasscreates new bound instance method moduletype(name [doc]creates new module object notes the types module should not be used to refer the type of built-in objects such as integerslistsor dictionaries in python types contains other names such as inttype and dicttype howeverthese names are just aliases for the built-in type names of int and dict in modern codeyou should just use the built-in type names because the types module only contains the names listed previously in python lib fl ff