Index: Delegator.py =================================================================== --- Delegator.py (revision 58404) +++ Delegator.py (working copy) @@ -1,4 +1,4 @@ -class Delegator: +class Delegator(object): # The cache is only used to be able to change delegates! @@ -12,6 +12,11 @@ self.__cache[name] = attr return attr + # special support for callables + # (assigning __call__ to an instance does not make it callable!) + def __call__(self, *args, **kw): + return self.delegate(*args, **kw) + def resetcache(self): for key in self.__cache.keys(): try: