doc string substition and overloading __doc__

Arthur ajsiegel at optonline.net
Sat May 3 10:55:59 EDT 2003


Fernando writes -

>What you have in mind, assigning to an _attribute_ of def3, is accomplished
>via:
>In [2]: def def3():
>...: pass
>...:

>In [3]: def3.__doc__ = """%s""" % 'def3'

>In [4]: pdoc def3
>def3


Which is in fact what I have in mind - i.e. it gets me to where I was
looking to get.

Art











More information about the Python-list mailing list