June 2019
Beginner to intermediate
770 pages
19h 24m
English
A class will often contain a number of elements, including attributes and method functions. A stateful class may also have a relatively complex API. Objects will be created, undergo changes in state, and possibly be garbage-collected at the end of their lives. We might want to describe some (or all) of these state changes in the class docstring or the method function docstrings.
We'll use the field list technique to document the class variables in the overall class docstring. This will generally focus on using the :ivar variable:, :cvar variable:, and :var variable: field list items.
Each individual method function will also use field lists to define the parameters and return the values and exceptions ...
Read now
Unlock full access