class documentation

class _Dispatch(object):

View In Hierarchy

Mirror the event listening definitions of an Events class with listener collections.

Classes which define a "dispatch" member will return a non-instantiated ._Dispatch subclass when the member is accessed at the class level. When the "dispatch" member is accessed at the instance level of its owner, an instance of the ._Dispatch class is returned.

A ._Dispatch class is generated for each .Events class defined, by the ._create_dispatcher_class function. The original .Events classes remain untouched. This decouples the construction of .Events subclasses from the implementation used by the event internals, and allows inspecting tools like Sphinx to work in an unsurprising way against the public API.

Method __getattr__ Undocumented
Method __init__ Undocumented
Method __reduce__ Undocumented
Method ​_clear Undocumented
Method ​_for​_class Undocumented
Method ​_for​_instance Undocumented
Method ​_join Create a 'join' of this ._Dispatch and another.
Method ​_update Populate from the listeners in another _Dispatch object.
Class Variable __slots__ Undocumented
Class Variable ​_empty​_listener​_reg Undocumented
Instance Variable ​_empty​_listeners Undocumented
Instance Variable ​_instance​_cls Undocumented
Instance Variable ​_parent Undocumented
Property ​_event​_descriptors Undocumented
Property ​_listen Undocumented
def __getattr__(self, name):

Undocumented

def __init__(self, parent, instance_cls=None):

Undocumented

def __reduce__(self):

Undocumented

def _clear(self):

Undocumented

def _for_class(self, instance_cls):

Undocumented

def _for_instance(self, instance):

Undocumented

def _join(self, other):

Create a 'join' of this ._Dispatch and another.

This new dispatcher will dispatch events to both ._Dispatch objects.

def _update(self, other, only_propagate=True):
Populate from the listeners in another _Dispatch object.
__slots__: tuple[str, ...] =

Undocumented

_empty_listener_reg =

Undocumented

_empty_listeners =

Undocumented

_instance_cls =

Undocumented

_parent =

Undocumented

@property
_event_descriptors =

Undocumented

@property
_listen =

Undocumented