[docs] docs Digest, Vol 62, Issue 70
Mike Hoy
mike at saguaroscuba.com
Sat Sep 29 16:19:52 CEST 2012
For all us who are new to programming, it should be pointed out in the
documentation that a double underscore is needed to get the docstring:
>>>>> function_name.__doc__ <--- double underscores
> Hi Paul,
>
> Thanks for the suggestion. This is currently mentioned in the
> tutorial portion of the documentation in the section called
> "Documentation Strings" though:
>
> http://docs.python.org/py3k/tutorial/controlflow.html#documentation-strings
>
> It provides a code snippet very similar to the one that you provided.
>
> --Chris
Yes that section of text does show an example of *function_name.__doc__*
but what he is complaining about is that he needs to use two
underscores. Not that he needs to see the *function_name.__doc* in an
example. In any case I suppose it could be mentioned that it is a double
underscore and not a single underscore but it seems so obvious to me
that it is double that it's not worth documenting anywhere.
--
-Mike Hoy
More information about the docs
mailing list