Matches the last selected element:: >>> from pyquery import PyQuery >>> d = PyQuery(' ') >>> d('p:last') [ ] ..
(self, xpath)
| 63 | return xpath |
| 64 | |
| 65 | def xpath_last_pseudo(self, xpath): |
| 66 | """Matches the last selected element:: |
| 67 | |
| 68 | >>> from pyquery import PyQuery |
| 69 | >>> d = PyQuery('<div><p></p><p class="last"></p></div>') |
| 70 | >>> d('p:last') |
| 71 | [<p.last>] |
| 72 | |
| 73 | .. |
| 74 | """ |
| 75 | xpath.add_post_condition('position() = last()') |
| 76 | return xpath |
| 77 | |
| 78 | def xpath_even_pseudo(self, xpath): |
| 79 | """Matches even elements, zero-indexed:: |
nothing calls this directly
no test coverage detected