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

Method new

src/docx/oxml/numbering.py:30–37  ·  view source on GitHub ↗

Return a new `` `` element having numId of `num_id` and having a `` `` child with val attribute set to `abstractNum_id`.

(cls, num_id, abstractNum_id)

Source from the content-addressed store, hash-verified

28
29 @classmethod
30 def new(cls, num_id, abstractNum_id):
31 """Return a new ``<w:num>`` element having numId of `num_id` and having a
32 ``<w:abstractNumId>`` child with val attribute set to `abstractNum_id`."""
33 num = OxmlElement("w:num")
34 num.numId = num_id
35 abstractNumId = CT_DecimalNumber.new("w:abstractNumId", abstractNum_id)
36 num.append(abstractNumId)
37 return num
38
39
40class CT_NumLvl(BaseOxmlElement):

Callers 1

add_numMethod · 0.45

Calls 2

OxmlElementFunction · 0.90
appendMethod · 0.80

Tested by

no test coverage detected