core: replace ancient YOLO loop in fire().

issue510
David Wilson 6 years ago
parent f5d9af80ef
commit e99b8a8de7

@ -329,7 +329,8 @@ def fire(obj, name, *args, **kwargs):
registered for the named signal on `obj`. registered for the named signal on `obj`.
""" """
signals = vars(obj).get('_signals', {}) signals = vars(obj).get('_signals', {})
return [func(*args, **kwargs) for func in signals.get(name, ())] for func in signals.get(name, ()):
func(*args, **kwargs)
def takes_econtext(func): def takes_econtext(func):

Loading…
Cancel
Save