Source
def odd(self):
ret = pyNodeList()
is_odd = True
for node in self:
if is_odd: ret.append(node)
is_odd = not is_odd
if len(ret) == 1: return ret[0]
else: return ret
returns odd elements.
def odd(self):
ret = pyNodeList()
is_odd = True
for node in self:
if is_odd: ret.append(node)
is_odd = not is_odd
if len(ret) == 1: return ret[0]
else: return ret