types.MappingProxyType

class types.MappingProxyType(mapping) Read-only proxy of a mapping. It provides a dynamic view on the mapping’s entries, which means that when the mapping changes, the view reflects these changes. New in version 3.3. key in proxy Return True if the underlying mapping has a key key, else False. proxy[key] Return the item of the underlying mapping with key key. Raises a KeyError if key is not in the underlying mapping. iter(proxy) Return an iterator over the keys of the underl

types.LambdaType

types.LambdaType The type of user-defined functions and functions created by lambda expressions.

types.GetSetDescriptorType

types.GetSetDescriptorType The type of objects defined in extension modules with PyGetSetDef, such as FrameType.f_locals or array.array.typecode. This type is used as descriptor for object attributes; it has the same purpose as the property type, but for classes defined in extension modules.

types.GeneratorType

types.GeneratorType The type of generator-iterator objects, created by generator functions.

types.FunctionType

types.FunctionType types.LambdaType The type of user-defined functions and functions created by lambda expressions.

types.FrameType

types.FrameType The type of frame objects such as found in tb.tb_frame if tb is a traceback object.

types.DynamicClassAttribute()

types.DynamicClassAttribute(fget=None, fset=None, fdel=None, doc=None) Route attribute access on a class to __getattr__. This is a descriptor, used to define attributes that act differently when accessed through an instance and through a class. Instance access remains normal, but access to an attribute through a class will be routed to the class’s __getattr__ method; this is done by raising AttributeError. This allows one to have properties active on an instance, and have virtual attributes

types.CoroutineType

types.CoroutineType The type of coroutine objects, created by async def functions. New in version 3.5.

types.coroutine()

types.coroutine(gen_func) This function transforms a generator function into a coroutine function which returns a generator-based coroutine. The generator-based coroutine is still a generator iterator, but is also considered to be a coroutine object and is awaitable. However, it may not necessarily implement the __await__() method. If gen_func is a generator function, it will be modified in-place. If gen_func is not a generator function, it will be wrapped. If it returns an instance of colle

types.CodeType

types.CodeType The type for code objects such as returned by compile().