karimbahgat/Pyqtree

iterating does not work as expected

amras0000 opened this issue · 0 comments

The behavior I would expect is:

    def __iter__(self):
        yield self
        for child in _loopallchildren(self):
            yield child

Iterating over quad doesn't yield itself. This makes ex. iterating over all items in the tree more tedious.:

for node in myQuadTree:
    yield node.item
for quad in myQuadTree:
    for node in quad.nodes:
        yield node.item