Function docstring as a local variable
Corey Richardson
kb1pkl at aim.com
Sun Jul 10 19:06:27 EDT 2011
Excerpts from Carl Banks's message of Sun Jul 10 18:59:02 -0400 2011:
> print __doc__
>
Python 2.7.1 (r271:86832, Jul 8 2011, 22:48:46)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> def foo():
... "Docstring"
... print __doc__
...
>>> foo()
None
>>>
What does yours do?
--
Corey Richardson
"Those who deny freedom to others, deserve it not for themselves"
-- Abraham Lincoln
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20110710/3741d81f/attachment-0001.sig>
More information about the Python-list
mailing list