[core/events] Use __ for private variables

This commit is contained in:
tobi-wan-kenobi 2020-03-29 14:37:30 +02:00
parent c625baa47a
commit 428b627daf

View file

@ -1,16 +1,16 @@
callbacks = {} __callbacks = {}
def register(event, callback, *args, **kwargs): def register(event, callback, *args, **kwargs):
callbacks.setdefault(event, []).append( __callbacks.setdefault(event, []).append(
lambda: callback(*args, **kwargs) lambda: callback(*args, **kwargs)
) )
def clear(): def clear():
callbacks.clear() __callbacks.clear()
def trigger(event): def trigger(event):
for callback in callbacks.get(event, []): for callback in __callbacks.get(event, []):
callback() callback()
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4