Doc strings in descriptors
Дамјан Георгиевски
gdamjan at gmail.com
Sun May 3 19:58:19 EDT 2009
> I have a simple descriptor to create a cached property as shown below.
...
> The problem is that when I use the help() function on them, I don't
> get the doc string from the function that is being wrapped.
...
> What do I need to do to get the doc string of the wrapped function to
> apper when using help()?
take a look at
http://pypi.python.org/pypi/decorator
and possibly
http://docs.python.org/library/functools.html#functools.update_wrapper
--
дамјан ( http://softver.org.mk/damjan/ )
Real men don't use backups, they post their stuff on a public ftp server
and let the rest of the world make copies.
-- Linus Torvalds
More information about the Python-list
mailing list