Stefan Behnel added the comment:

Whenever you feel a need for using range(len(...)), you are almost always doing 
something wrong. The problem in your code is that you are modifying the tree 
while iterating over it. However, please ask this question on the mailing list 
as the bug tracker is not the right place to discuss this.

> If we leave "children" as in "all <country> children of *root*", it doesn't 
> illuminate the fact that if root had a great-great-grandchild also named 
> <country>, then it would return that as well.

No, it wouldn't. It behaves exactly as described. Thus the reference to the 
XPath section for further explanations.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24724>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to