Skip to content

PEP 287 - reStructuredText docstrings examples

PEP 287 - reStructuredText Docstring Format

Handsdown API Index / Examples / PEP 287 - reStructuredText docstrings examples

Auto-generated documentation for examples.rst_docstrings module.

RSTExample

Show source in rst_docstrings.py:10

Signature

class RSTExample:
    ...

RSTExample.reference

Show source in rst_docstrings.py:11

This is a reference for RST-style docstrings. Check source code to see how it works.

Arguments

  • my_param - Parameter example
  • typed_param int - Typed parameter example

Returns

Type: str Return statement

Raises

  • ValueError - Raises example

Code example

data = {
    'key': 'value',
}

print(data)

Signature

@staticmethod
def reference():
    ...

RSTExample.replace_test

Show source in rst_docstrings.py:40

Check if all attribute attributes, data and exception Exception in class RSTExample and class RSTExample look good.

Signature

@staticmethod
def replace_test():
    ...

RSTExample.rtype_test

Show source in rst_docstrings.py:31

:rtype: test.

Returns

Return statement Type: bool

Signature

@staticmethod
def rtype_test():
    ...