[Tutor] Basic question about docstrings

Emile van Sebille emile at fenx.com
Wed Jul 29 21:57:46 CEST 2015


On 7/29/2015 8:45 AM, David Aldrich wrote:
> Hi
>
> If I have a script called main.py and document a function in it:
>
> def get_value(x):
>      """
>      Some text ...
>      :param x:     Some value
>      :returns:      Something useful
>      """
>
> What is the most basic way of showing those docstrings at the Python prompt?

Are you asking about help?  as in:

 >>> help(get_value)

Emile



More information about the Tutor mailing list