aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Tools
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-02-19 23:36:17 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-02-19 23:36:17 +0000
commit06bcb61d2691eae37724eb82412bccd08af587f6 (patch)
tree1df913bdc91c6999e9e9e33c37977d3ba339351e /lib/python/Tools
parent0b7d760a5cde7fc6efa6fe2cfa49b29df0386dab (diff)
downloadenigma2-06bcb61d2691eae37724eb82412bccd08af587f6.tar.gz
enigma2-06bcb61d2691eae37724eb82412bccd08af587f6.zip
add kwargs support to boundFunction
Diffstat (limited to 'lib/python/Tools')
-rw-r--r--lib/python/Tools/BoundFunction.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/python/Tools/BoundFunction.py b/lib/python/Tools/BoundFunction.py
index 5447451d..f28a50c8 100644
--- a/lib/python/Tools/BoundFunction.py
+++ b/lib/python/Tools/BoundFunction.py
@@ -1,6 +1,9 @@
class boundFunction:
- def __init__(self, fnc, *args):
+ def __init__(self, fnc, *args, **kwargs):
self.fnc = fnc
self.args = args
- def __call__(self, *args):
- self.fnc(*self.args + args)
+ self.kwargs = kwargs
+ def __call__(self, *args, **kwargs):
+ newkwargs = self.kwargs
+ newkwargs.update(kwargs)
+ self.fnc(*self.args + args, **newkwargs)