cfdm.NumpyArray._docstring_substitutions¶
-
NumpyArray.
_docstring_substitutions
()[source]¶ Returns the substitutions that apply to methods of the class.
Text to be replaced is specified as a key in the returned dictionary, with the replacement text defined by the corresponding value.
Special docstring substitutions, as defined by a class’s
_docstring_special_substitutions
method, may be used in the replacement text, and will be substituted as usual.Replacement text may contain other non-special substitutions.
Note
The values are only checked once for embedded non-special substitutions, so if the embedded substitution itself contains a non-special substitution then the latter will not be replaced. This restriction is to prevent the possibility of infinite recursion.
A key must be either a
str
or are.Pattern
object.If a key is a
str
then the corresponding value must be a string.If a key is a
re.Pattern
object then the corresponding value must be a string or a callable, as accepted by there.Pattern.sub
method.New in version (cfdm): 1.8.7.0
See also
_docstring_special_substitutions
,_docstring_package_depth
,_docstring_method_exclusions
,__docstring_substitutions__
,__docstring_package_depth__
,__docstring_method_exclusions__
- Parameters
- cls: class
The class.
- Returns
dict
The docstring substitutions. A dictionary key matches text in the docstrings, with a corresponding value its replacement.