Matches odd elements, zero-indexed:: >>> from pyquery import PyQuery >>> d = PyQuery(' ') >>> d('p:odd') [ ] ..
(self, xpath)
| 90 | return xpath |
| 91 | |
| 92 | def xpath_odd_pseudo(self, xpath): |
| 93 | """Matches odd elements, zero-indexed:: |
| 94 | |
| 95 | >>> from pyquery import PyQuery |
| 96 | >>> d = PyQuery('<div><p></p><p class="last"></p></div>') |
| 97 | >>> d('p:odd') |
| 98 | [<p.last>] |
| 99 | |
| 100 | .. |
| 101 | """ |
| 102 | xpath.add_post_condition('position() mod 2 = 0') |
| 103 | return xpath |
| 104 | |
| 105 | def xpath_checked_pseudo(self, xpath): |
| 106 | """Matches odd elements, zero-indexed:: |
nothing calls this directly
no test coverage detected