Google docstrings examples
Links
Handsdown API Index / Examples / Google docstrings examples
Auto-generated documentation for examples.google_docstrings module.
ClassExample
Show source in google_docstrings.py:13
Google-style class example
Attributes
attr1str - Description ofattr1.attr2:obj:int, optional - Description ofattr2.
Signature
ClassExample().method_example
Show source in google_docstrings.py:22
Summary line.
Extended description of method.
Examples
Examples should be written in doctest format, and should illustrate how to use the function
Arguments
textstr, optional - Description of arg1*argsstr - Description of args**kwargsstr - Description of kwargs
Returns
int- Description of return value
Signature
function_example
Show source in google_docstrings.py:56
Summary line.
Extended description of function. You can use this function like
Arguments
arg1int - Description of arg1arg2str - Description of arg2arg3str, optional - Description of arg3
Returns
bool- Description of return value
Raises
AttributeError- TheRaisessection is a list of all exceptions that are relevant to the interface.ValueError- Ifparam2is equal toparam1.
Signature
function_with_pep484_type_annotations
Show source in google_docstrings.py:87
Example function with PEP 484 type annotations.
Arguments
param1- The first parameter.param2- The second parameter.
Returns
The return value. True for success, False otherwise.