7stud a écrit : (snip)
class Wrapper(object): def __init__(self, obj, func): self.obj = obj self.func = funcdef __call__(self, *args): return self.func(*args) def __getattr__(self, name): return object.__getattribute__(self.obj, name)
This should be return getattr(self.obj, name)directly calling object.__getattribute__ might skip redefinition of __getattribute__ in self.obj.__class__ or it's mro.
-- http://mail.python.org/mailman/listinfo/python-list