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
attr1
str - 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
text
str, optional - Description of arg1*args
str - Description of args**kwargs
str - 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
arg1
int - Description of arg1arg2
str - Description of arg2arg3
str, optional - Description of arg3
Returns
bool
- Description of return value
Raises
AttributeError
- TheRaises
section is a list of all exceptions that are relevant to the interface.ValueError
- Ifparam2
is 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.