On 04Apr2012 23:07, Steven D'Aprano <[email protected]> 
wrote:
| If you decorate a function, by default the docstring is lost.
| 
| @decorate
| def spam(x, y):
|     """blah blah blah blah"""
| 
| spam.__doc__ => raises exception
| 
| Solution: make sure your decorator uses functools.wraps().

There's a functools.wraps()? [*smacks forehead with palm*] Thanks.
-- 
Cameron Simpson <[email protected]> DoD#743
http://www.cskk.ezoshosting.com/cs/

A pessimist is an optimist in full possession of the facts.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to