Commit 08baecfc authored by Link Mauve's avatar Link Mauve
Browse files

Make more Cython-friendly.

parent 840ad743
......@@ -55,10 +55,11 @@ class EventHandler(object):
if name not in
return False
callbacks =[name]
if position >= 0:[name].insert(position, callback)
callbacks.insert(position, callback)
return True
......@@ -77,11 +78,10 @@ class EventHandler(object):
Remove the callback from the list of callbacks of the given event
if not name:
for event in
while callback in[event]:[event].remove(callback)
return True
for callbacks in
while callback in callbacks:
if callback in[name]:[name].remove(callback)
callbacks =[name]
if callback in callbacks:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment