Configuration
-
default_description_format
-
The format string for the default value.
Fields
These fields can be used in docstrings for classes, functions, methods etc., alongside other fields such as :param:
.
-
:default <name>:
value Overrides the default value for
<name>
.The value must be formatted how you would like it to be displayed in Sphinx. This can be useful when the default value in the signature is
None
and the true default value is assigned in the function body, such as for a mutable default argument.Example:
:param name: The name of the list. :default name: :py:obj:`True`
-
:no-default <name>:
value Suppresses display of the default value for
<name>
.This allows for default values to be suppressed on a per-argument basis.
Example:
:param name: The name of the list. :no-default name:
-
domdf_python_tools.bases.
namedlist
(name='NamedList') A factory function to return a custom list subclass with a name.
- Parameters
name (
str
) – The name of the list.- Return type
Callable
-