Hi Peter, Peter Otten <__pete...@web.de> writes: > class Method(object): > def __init__(self, obj, func=None): > if func is None: > func = obj.im_func > obj = obj.im_self
This requires that func is a bound method. What I want is to have a universal class that "always" works: with unbound functions, with bound function, with lambda expressions, with locally defined functions, ... For a user of my class, there is no visible reason, why some of them shall work, while others dont. Viele Grüße Ole -- http://mail.python.org/mailman/listinfo/python-list