class documentation
class EventData:
Event data class. This class is used to pass data to event handlers.
| Method | __getitem__ |
Get an item from the payload if it is a tuple. |
| Method | __len__ |
Get the length of the payload if it is a tuple. |
| Class Variable | name |
The event name. |
| Class Variable | payload |
The event payload. This may be any data that should be passed to the event handlers. It can be a single value or a tuple of values. |
Get an item from the payload if it is a tuple.
| Parameters | |
key:int | The index of the item to get from the payload. |
| Returns | |
Any | The item at the specified index in the payload. |
| Raises | |
TypeError | If the payload is not a tuple. |
Get the length of the payload if it is a tuple.
| Returns | |
int | The length of the payload if it is a tuple. |
| Raises | |
TypeError | If the payload is not a tuple. |