Re: functools's partial and update_wrapper does not work together

2008-08-21 Thread piotr . findeisen
> If not already done by someone else, it might be worth filling a ticket > - generic decorators should work with any callable, not only with > functions (well, IMHO at least). you're right. it's already there http://bugs.python.org/issue3445 regards! -- http://mail.python.org/mailman/listinfo/p

functools's partial and update_wrapper does not work together

2008-08-21 Thread piotr . findeisen
Hello! I wanted to use a decorator to wrap partially applied function like this: from functools import * def never_throw(f): @wraps(f) def wrapper(*args, **kwargs): try: return f(*args, **kwargs) except: pass return wrapper def foo(i): raise ValueError(str(i) + "