From ca3fdc3fa97cd9281de3c77edb531a57f4e6a475 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sat, 9 Sep 2017 02:14:55 +0530 Subject: [PATCH] Support *args in fire() too. --- econtext/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/econtext/core.py b/econtext/core.py index dbd35b50..c91cb5a5 100644 --- a/econtext/core.py +++ b/econtext/core.py @@ -96,9 +96,9 @@ def listen(obj, name, func): signals.setdefault(name, []).append(func) -def fire(obj, name, **kwargs): +def fire(obj, name, *args, **kwargs): signals = vars(obj).get('_signals', {}) - return [func(**kwargs) for func in signals.get(name, ())] + return [func(*args, **kwargs) for func in signals.get(name, ())] def set_cloexec(fd):