Skip to content

Instantly share code, notes, and snippets.

@SeanSyue
Created August 12, 2018 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SeanSyue/e638c0adcd6f1ef2df0c532cb8176a87 to your computer and use it in GitHub Desktop.
Save SeanSyue/e638c0adcd6f1ef2df0c532cb8176a87 to your computer and use it in GitHub Desktop.
A simple example on importing docstring in Python.
import mymodule
print(mymodule.__doc__)
print(mymodule.f.__doc__)
"""This is the module docstring."""
def f(x):
"""This is the function docstring."""
return 2 * x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment