def numbering_part(self): """ Instance of |NumberingPart| for this document. Creates an empty numbering part if one is not present. """ try: return self._document_part.part_related_by(RT.NUMBERING) except KeyError: numbering_part = NumberingPart.new() self._document_part.relate_to(numbering_part, RT.NUMBERING) return numbering_part
def numbering_part(self): """ A |NumberingPart| object providing access to the numbering definitions for this document. Creates an empty numbering part if one is not present. """ try: return self.part_related_by(RT.NUMBERING) except KeyError: numbering_part = NumberingPart.new() self.relate_to(numbering_part, RT.NUMBERING) return numbering_part