MCPcopy Index your code
hub / github.com/python-openxml/python-docx / CT_DecimalNumber

Class CT_DecimalNumber

src/docx/oxml/shared.py:13–24  ·  view source on GitHub ↗

Used for `` ``, `` ``, `` `` and several others, containing a text representation of a decimal number (e.g. 42) in its ``val`` attribute.

Source from the content-addressed store, hash-verified

11
12
13class CT_DecimalNumber(BaseOxmlElement):
14 """Used for ``<w:numId>``, ``<w:ilvl>``, ``<w:abstractNumId>`` and several others,
15 containing a text representation of a decimal number (e.g. 42) in its ``val``
16 attribute."""
17
18 val: int = RequiredAttribute("w:val", ST_DecimalNumber) # pyright: ignore[reportAssignmentType]
19
20 @classmethod
21 def new(cls, nsptagname: str, val: int):
22 """Return a new ``CT_DecimalNumber`` element having tagname `nsptagname` and
23 ``val`` attribute set to `val`."""
24 return OxmlElement(nsptagname, attrs={qn("w:val"): str(val)})
25
26
27class CT_OnOff(BaseOxmlElement):

Callers

nothing calls this directly

Calls 1

RequiredAttributeClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…