MCPcopy Create free account
hub / github.com/scanny/python-pptx / _add_list_getter

Method _add_list_getter

src/pptx/oxml/xmlchemy.py:345–352  ·  view source on GitHub ↗

Add a read-only ``{prop_name}_lst`` property to the element class to retrieve a list of child elements matching this type.

(self)

Source from the content-addressed store, hash-verified

343 self._add_to_class(self._insert_method_name, _insert_child)
344
345 def _add_list_getter(self):
346 """
347 Add a read-only ``{prop_name}_lst`` property to the element class to
348 retrieve a list of child elements matching this type.
349 """
350 prop_name = f"{self._prop_name}_lst"
351 property_ = property(self._list_getter, None, None)
352 setattr(self._element_cls, prop_name, property_)
353
354 @lazyproperty
355 def _add_method_name(self):

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected