Staging: this is not the live site, pydocs.org.
With one argument, return the type of an object. The return value is a type object and generally the same object as returned by object.__class__.
Changed in 3.6, 3.15
- 3.6: Subclasses of type which don’t override type.__new__ may no longer use the one-argument form to get the type of an object.
- 3.15: dict can now be a frozendict.
Members of type
_
- __annotate__
- The annotate function for this class, or None if the class has no annotations.
- __annotations__
- A dictionary containing variable annotations collected during class body execution.
- __base__
- The base class of the class hierarchy.
- __bases__
- A tuple containing the class’s bases.
- __dict__
- A mapping proxy providing a read-only view of the class’s namespace.
- __doc__
- The class’s documentation string, or None if undefined.
- __firstlineno__
- The line number of the first line of the class definition, including decorators.
- __module__
- The name of the module in which the class was defined.
- __mro__
- The tuple of classes that are considered when looking for base classes during method resolution.
- __static_attributes__
- A tuple containing names of attributes of this class which are assigned through self.X from any function in its body.
m
- mro
- Return a type's method resolution order.