Function docstring as a local variable

Carl Banks pavlovevidence at gmail.com
Sun Jul 10 18:59:02 EDT 2011


On Sunday, July 10, 2011 3:50:18 PM UTC-7, Tim Johnson wrote:
>   Here's a related question:
>   I can get the docstring for an imported module:
>   >>> import tmpl as foo
>   >>> print(foo.__doc__)
>   Python templating features
> 
>    Author - tim at akwebsoft dot com
> 
>  ## Is it possible to get the module docstring
>  ## from the module itself?


print __doc__


Carl Banks



More information about the Python-list mailing list