Source code for

from __future__ import annotations
from typing import Any
from import EventsPartial
from import Events as LoEvents
from import GenericArgs

[docs]class Events(EventsPartial): """ Basic class for events. Implements ```` protocol. .. versionadded:: 0.32.0 """
[docs] def __init__(self, source: Any = None, trigger_args: GenericArgs | None = None): """ Construct for Events Args: source (Any | None, optional): Source can be class or any object. The value of ``source`` is the value assigned to the ``EventArgs.event_source`` property. Defaults to current instance of this class. trigger_args (GenericArgs, optional): Args that are passed to events when they are triggered. """ if source is None: source = self super().__init__(LoEvents(source, trigger_args))