Simple concept ? yes, but useful..
Docstring can be represented with the help of date between
""" .
if you have a module called test , inside test.py you may have something like below:
"""
I am test modules's docstring.
"""
similary class , class methods and functions can have docstrings written ..
class A:
""" Class's docstring"""
def A_method(self):
""" A_methods docstring"""
The docstring can be printed by help() or .__doc__
>>>import test
>>> test.__doc__
" I am test modules's docstring"
>>> help(test)
Help on module test:
NAME
test - I am test modules's docstring
FILE
/home/hchiramm/Downloads/sql-back/test.py
Let me know if you have any doubts..