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

Function _child

lab/cust-elm-classes/main.py:31–38  ·  view source on GitHub ↗

Return direct child of *element* having *child_tagname* or :class:`None` if no such child element is present.

(element, child_tagname)

Source from the content-addressed store, hash-verified

29 return element
30
31def _child(element, child_tagname):
32 """
33 Return direct child of *element* having *child_tagname* or :class:`None`
34 if no such child element is present.
35 """
36 xpath = './%s' % child_tagname
37 matching_children = element.xpath(xpath, namespaces=nsmap)
38 return matching_children[0] if len(matching_children) else None
39
40def _child_list(element, child_tagname):
41 """

Callers 8

_get_child_or_appendFunction · 0.85
_get_child_or_firstFunction · 0.85
_get_child_or_insertFunction · 0.85
_required_childFunction · 0.85
CT_RegularTextRunClass · 0.85
CT_ShapeClass · 0.85
CT_ShapeNonVisualClass · 0.85
CT_TextBodyClass · 0.85

Calls 1

xpathMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…