urbanoctowaddle.example_numpy.ExampleClass

class urbanoctowaddle.example_numpy.ExampleClass(param1, param2, param3)[source]

The summary line for a class docstring should fit on one line.

If the class has public attributes, they may be documented here in an Attributes section and follow the same formatting as a function’s Args section. Alternatively, attributes may be documented inline with the attribute’s declaration (see __init__ method below).

Properties created with the @property decorator should be documented in the property’s getter method.

attr1

str – Description of attr1.

attr2

int, optional – Description of attr2.

__init__(param1, param2, param3)[source]

Example of docstring on the __init__ method.

The __init__ method may be documented in either the class level docstring, or as a docstring on the __init__ method itself.

Either form is acceptable, but the two should not be mixed. Choose one convention to document the __init__ method and be consistent with it.

Note

Do not include the self parameter in the Parameters section.

Parameters:
  • param1 (str) – Description of param1.
  • param2 (list(str)) – Description of param2. Multiple lines are supported.
  • param3 (int, optional) – Description of param3.

Methods

__init__(param1, param2, param3) Example of docstring on the __init__ method.
example_method(param1, param2) Class methods are similar to regular functions.