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

Method clone

src/docx/oxml/section.py:186–194  ·  view source on GitHub ↗

Return an exact duplicate of this `` `` element tree suitable for use in adding a section break. All rsid* attributes are removed from the root `` `` element.

(self)

Source from the content-addressed store, hash-verified

184 pgMar.bottom = value if value is None or isinstance(value, Length) else Length(value)
185
186 def clone(self) -> CT_SectPr:
187 """Return an exact duplicate of this ``<w:sectPr>`` element tree suitable for
188 use in adding a section break.
189
190 All rsid* attributes are removed from the root ``<w:sectPr>`` element.
191 """
192 cloned_sectPr = deepcopy(self)
193 cloned_sectPr.attrib.clear()
194 return cloned_sectPr
195
196 @property
197 def footer(self) -> Length | None:

Callers 1

add_section_breakMethod · 0.80

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected