unbalanced tree iteration issue

Ian Kelly ian.g.kelly at gmail.com
Fri Jan 14 13:08:36 EST 2011


On Fri, Jan 14, 2011 at 11:07 AM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> class PostOrderIter(object):
>
>    def __iter__(self, node):
>        self.stack = [(node, 0)]

That __iter__ should actually be __init__, of course.



More information about the Python-list mailing list