[Tutor] Basic question about docstrings

Danny Yoo danny.yoo at gmail.com
Fri Jul 31 03:49:44 CEST 2015


>
> So main.py contains:
>
> def get_field(value, start_bit, end_bit):
>     <snip>
>
> and I see:
>
> >>> import main
> >>> help(get_field)
>  Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
>  NameError: name 'get_field' is not defined
>
>
> help(main) works ok but is rather verbose.

Try:

   import main
   help(main.get_field)


More information about the Tutor mailing list