class documentation
Event topics are added as new methods to an EventManager instance. Events can be raised by calling those new methods.
| Method | __getattr__ |
Dynamically create and return an Event instance when accessing an attribute that does not exist. |
| Method | add |
Create and add a new Event. |
| Method | add |
Add a new event handler to an Event or to a list of Event instance. |
| Method | has |
Check whether an Event instance exists. |
| Method | has |
Test whether one or more events have a specific handler assigned. |
| Method | remove |
Remove all registered Event instances. |
| Method | remove |
Remove an Event instance by its name. |
| Method | remove |
Remove an event handler from an Event instance or a list of Event instances. |
Dynamically create and return an Event instance when accessing an attribute that does not exist.
| Parameters | |
name:str | The name of the attribute to access, which will be used as the name of the Event instance. |
| Returns | |
Event | The created Event instance. |
| Raises | |
AttributeError | If the attribute name starts with an underscore (to prevent access to private attributes). |