Last active
March 22, 2020 19:16
-
-
Save LouisdeBruijn/56fca54647fd8a4f8d4f9362f9960657 to your computer and use it in GitHub Desktop.
Python docstrings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def show_docstring(): | |
| """Print function description to user""" | |
| print("Using __doc__ method:") | |
| print(show_docstring.__doc__) | |
| print("Using help() function:") | |
| help(show_docstring) | |
| $ show_docstring(); | |
| "Using __doc__ method:" | |
| "Print function description to user" | |
| "Using help() function:" | |
| "Print function description to user" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment