MCPcopy Create free account
hub / github.com/gawel/pyquery / prev_all

Method prev_all

pyquery/pyquery.py:503–512  ·  view source on GitHub ↗

>>> h = ' Hi Bye ' >>> d = PyQuery(h) >>> d('p:last').prev_all() [ ] >>> d('p:last').prevAll() [ ]

(self, selector=None)

Source from the content-addressed store, hash-verified

501
502 @with_camel_case_alias
503 def prev_all(self, selector=None):
504 """
505 >>> h = '<span><p class="hello">Hi</p><p>Bye</p><img scr=""/></span>'
506 >>> d = PyQuery(h)
507 >>> d('p:last').prev_all()
508 [<p.hello>]
509 >>> d('p:last').prevAll()
510 [<p.hello>]
511 """
512 return self._filter_only(selector, self._prev_all(), reverse=True)
513
514 def siblings(self, selector=None):
515 """

Callers

nothing calls this directly

Calls 2

_filter_onlyMethod · 0.95
_prev_allMethod · 0.95

Tested by

no test coverage detected