Skip to content

Instantly share code, notes, and snippets.

@yuchen-xue
Created August 12, 2018 07:59
Show Gist options
  • Save yuchen-xue/e638c0adcd6f1ef2df0c532cb8176a87 to your computer and use it in GitHub Desktop.
Save yuchen-xue/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