I know what’s the standard way to document functions, classes and modules, but how do I document packages – do I put a docstring in __init__.py, or something else?
I know what’s the standard way to document functions, classes and modules, but how
Share
Yes, just like for a function or class comment, the first item in the __init__.py file should be a comment string:
Now if you import the package, and use help(package), you will see your docstring. See more here: http://www.python.org/dev/peps/pep-0257/