guest_worker/sorteerhoed/Signal.py

13 lines
335 B
Python
Raw Permalink Normal View History

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