Return elements that don't match the given selector: >>> d = PyQuery(' Hi Bye ') >>> d('p').not_('.hello') [ ]
(self, selector)
| 622 | return self._copy(elements, parent=self) |
| 623 | |
| 624 | def not_(self, selector): |
| 625 | """Return elements that don't match the given selector: |
| 626 | |
| 627 | >>> d = PyQuery('<p class="hello">Hi</p><p>Bye</p><div></div>') |
| 628 | >>> d('p').not_('.hello') |
| 629 | [<p>] |
| 630 | """ |
| 631 | exclude = set(self._copy(selector, self)) |
| 632 | return self._copy([e for e in self if e not in exclude], |
| 633 | parent=self) |
| 634 | |
| 635 | def is_(self, selector): |
| 636 | """Returns True if selector matches at least one current element, else |