Function docstring as a local variable
Tim Chase
python.list at tim.thechases.com
Sun Jul 10 19:14:53 EDT 2011
On 07/10/2011 05:50 PM, Tim Johnson wrote:
> * python at bdurham.com<python at bdurham.com> [110710 14:17]:
>> def test():
>> """This is my doc string"""
>> print test.__doc__
>> test()
>
> Works for me. Works for the application I'm after. thanks
> Here's a related question:
> ## Is it possible to get the module docstring
> ## from the module itself?
You're gonna kick yourself :)
print __doc__
-tkc
More information about the Python-list
mailing list