Generate an instance of this class to produce the documentation of a single element of the implementation, either a module, a class, or a function/method.
Instances of this class are generated to print a __doc__ string. The work is already done during construction. This function needs to be implemented by a class since we have to keep track of a state describing whether to use "left" or "right" quotes (string value of m_quotState ).
m_linemode is a stack describing the currently valid modes. Modes usually correspond with open LaTeX environments that have to be closed after finishing a documentation. Mode [] denotes normal lines. Valid modes with a single entry are ["code"] , and ["verbatim"] for normal text, or code lines as they are used by module doctest , or verbatim output repectively. The list may have more than one entry on item lists (keyword "itemize" ) or enumeration lists (keyword "enumerate").
Instances of this class print into a specialization of Formatter .