Sphinx docstrings examples
Links
Handsdown API Index / Examples / Sphinx docstrings examples
Auto-generated documentation for examples.sphinx_docstrings module.
RSTExample
Show source in sphinx_docstrings.py:10
Signature
RSTExample.directives_test
Show source in sphinx_docstrings.py:33
Test for some random Sphinx directives
def sum_eq_n?(arr, n)
return true if arr.empty? && n == 0
arr.product(arr).reject { |a,b| a == b }.any? { |a,b| a + b == n }
end
Notes
short note
See also
modules mod:zipfile
, mod:tarfile
Signature
RSTExample.reference
Show source in sphinx_docstrings.py:11
This is a reference for Sphinx-style RST-style
docstrings. Check source
code
to see how it works.
Code example
Arguments
my_param
- Parameter exampletyped_param
int - Typed parameter example
Returns
Type: str Return statement
Raises
ValueError
- Raises example
Signature
RSTExample.version_directives_test
Show source in sphinx_docstrings.py:57
Test for Version-related directives
Notes
Added in version 2.5 The spam parameter.
Changed in version 2.7 Mandatory spam parameter.
Deprecated in version 3.1
Use :func:spam
instead.