class _Dispatch(object):
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 |
Create a 'join' of this ._Dispatch
and another.
This new dispatcher will dispatch events to both
._Dispatch
objects.
_Dispatch
object.