class Field:
Represent a field with a name and/or a type and/or a description. Commonly a parameter description. It's also used for Returns section and other sections structured with fields.
This representation do not hold the information about which section the field correspond, it depends of context of usage.
Method | __bool__ |
Returns True if the field has any kind of content. |
Instance Variable | content |
The content of the field. |
Instance Variable | lineno |
Line number of the field relative to the begening of the docstring. |
Instance Variable | name |
The name of the parameter or return value, can be empty. Let's note that Field.name is not the field_name in the docutils sense (i.e. "param" or "type"). But the actual parameter name. |
Instance Variable | type |
The enventual type of the parameter/return value. |
str
=
Field.name
is not the field_name
in the docutils sense (i.e. "param" or "type"). But the actual parameter name.