[core/events] Use __ for private variables
This commit is contained in:
parent
c625baa47a
commit
428b627daf
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue