Handsdown API Index / Examples / Sphinx docstrings examples
Auto-generated documentation for examples.sphinx_docstrings module.
Show source in sphinx_docstrings.py:10
class RSTExample: ...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 }
endshort note
(a + b)^2 = a^2 + 2ab + b^2
(a - b)^2 = a^2 - 2ab + b^2modules :py:mod:zipfile, :py:mod:tarfile
@staticmethod
def directives_test(): ...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
data = {
'key': 'value',
}
print(data)my_param- Parameter exampletyped_paramint - Typed parameter example
Type: str Return statement
ValueError- Raises example
@staticmethod
def reference(): ...Show source in sphinx_docstrings.py:57
Test for Version-related directives
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.
@staticmethod
def version_directives_test(): ...