guest_worker/sorteerhoed/Signal.py

13 lines
335 B
Python
Raw Normal View History

2019-10-23 08:56:28 +00:00
class Signal:
"""
An event, with possible parameters.
Named 'signal' to avoid confusion with threading.Event
"""
2019-10-23 20:33:37 +00:00
def __init__(self, name: str, params: dict = None):
2019-10-23 08:56:28 +00:00
self.name = name
2019-10-23 20:33:37 +00:00
self.params = params
def __repr__(self):
return f"<Signal {self.name}: {self.params}>"