types#
Classes
Route attribute access on a class to __getattr__. |
|
Represent a PEP 585 generic type |
|
A simple attribute-based namespace. |
|
Represent a PEP 604 union type |
Define names for built-in types that aren’t directly accessible as a builtin.
Functions
|
Convert regular generator function to a coroutine. |
|
Create a class object dynamically using the appropriate metaclass. |
|
Call the __prepare__ method of the appropriate metaclass. |
|
Resolve MRO entries dynamically as specified by PEP 560. |
- types.new_class(name, bases=(), kwds=None, exec_body=None)[source]#
Create a class object dynamically using the appropriate metaclass.
- types.prepare_class(name, bases=(), kwds=None)[source]#
Call the __prepare__ method of the appropriate metaclass.
Returns (metaclass, namespace, kwds) as a 3-tuple
metaclass is the appropriate metaclass namespace is the prepared class namespace kwds is an updated copy of the passed in kwds argument with any ‘metaclass’ entry removed. If no kwds argument is passed in, this will be an empty dict.