Created
October 11, 2014 07:06
-
-
Save kenchangh/66ecae161caca043a689 to your computer and use it in GitHub Desktop.
An example on "Googley" docstring
This file contains 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 public_fn_with_googley_docstring(name, state=None): | |
"""This function does something. | |
Args: | |
name (str): The name to use. | |
Kwargs: | |
state (bool): Current state to be in. | |
Returns: | |
int. The return code:: | |
0 -- Success! | |
1 -- No good. | |
2 -- Try again. | |
Raises: | |
AttributeError, KeyError | |
A really great idea. A way you might use me is | |
>>> print public_fn_with_googley_docstring(name='foo', state=None) | |
0 | |
BTW, this always returns 0. **NEVER** use with :class:`MyPublicClass`. | |
""" | |
return 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment