Skip to content

Instantly share code, notes, and snippets.

View piyushst's full-sized avatar
💭
Busy in being more expensive

Piyush Srivastava piyushst

💭
Busy in being more expensive
View GitHub Profile
@piyushst
piyushst / events.py
Created January 26, 2020 18:43 — forked from bbengfort/events.py
Event/Event Listener that implements the observer pattern (from Mortar).
from copy import copy, deepcopy
from collections import defaultdict
class Event(object):
"""
Basis for all events that are dispatched by the EventDispatcher.
"""
# Internal event "types"
ACTIVATE = "activate"