[Techtalk] Python doc strings

Carla Schroder carla at bratgrrl.com
Sun Apr 25 15:55:31 EST 2004


On Sunday 25 April 2004 3:18 pm, Carla Schroder wrote:
> Also, this does not work:
> http://www.python.org/doc/current/tut/node6.html
> 
> 
> 
> >>> def my_function():
> ...     """Do nothing, but document it.
> ... 
> ...     No, really, it doesn't do anything.
> ...     """
> ...     pass
> ... 
> >>> print my_function.__doc__
> Do nothing, but document it.
> 
>     No, really, it doesn't do anything.
> 

Curiously, when I run the above example from the tutorial, it does work. It's 
when I define my own that it horks up the error message.

???

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Carla Schroder
this message brought to you
by Libranet 2.8 and Kmail
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the Techtalk mailing list