MCPcopy Index your code
hub / github.com/clips/pattern / _first_child

Method _first_child

pattern/web/__init__.py:2900–2906  ·  view source on GitHub ↗

Returns the first child Element of the given element.

(self, e)

Source from the content-addressed store, hash-verified

2898 return s[:2]
2899
2900 def _first_child(self, e):
2901 """ Returns the first child Element of the given element.
2902 """
2903 if isinstance(e, Node):
2904 for e in e.children:
2905 if isinstance(e, Element):
2906 return e
2907
2908 def _first_sibling(self, e):
2909 """ Returns the first next sibling Element of the given element.

Callers 2

matchMethod · 0.95
searchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected