base
base
¶
Base classes and other objects used by enumerations.
BaseEnum
¶
Bases: int, Enum
Base class for Enums that do not map XML attr values.
The enum's value will be an integer, corresponding to the integer assigned the corresponding member in the MS API enum of the same name.
BaseXmlEnum
¶
Bases: int, Enum
Base class for Enums that also map XML attr values.
The enum's value will be an integer, corresponding to the integer assigned the corresponding member in the MS API enum of the same name.
from_xml
classmethod
¶
Enumeration member corresponding to XML attribute value xml_value.
Example:
Source code in src/docx/enum/base.py
to_xml
classmethod
¶
XML value of this enum member, generally an XML attribute value.
Source code in src/docx/enum/base.py
DocsPageFormatter
¶
Generate an .rst doc page for an enumeration.
Formats a RestructuredText documention page (string) for the enumeration class parts passed to the constructor. An immutable one-shot service object.
Source code in src/docx/enum/base.py
page_str
property
¶
The RestructuredText documentation page for the enumeration.
This is the only API member for the class.