MCPcopy Create free account
hub / github.com/clips/pattern / findParents

Method findParents

pattern/web/soup/BeautifulSoup.py:331–336  ·  view source on GitHub ↗

Returns the parents of this Tag that match the given criteria.

(self, name=None, attrs={}, limit=None, **kwargs)

Source from the content-addressed store, hash-verified

329 return r
330
331 def findParents(self, name=None, attrs={}, limit=None, **kwargs):
332 """Returns the parents of this Tag that match the given
333 criteria."""
334
335 return self._findAll(name, attrs, None, limit, self.parentGenerator,
336 **kwargs)
337 fetchParents = findParents # Compatibility with pre-3.x
338
339 #These methods do the real heavy lifting.

Callers 2

findParentMethod · 0.95
testParentsMethod · 0.80

Calls 1

_findAllMethod · 0.95

Tested by 1

testParentsMethod · 0.64