On Fri, Jan 14, 2011 at 11:07 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote: > class PostOrderIter(object): > > def __iter__(self, node): > self.stack = [(node, 0)]
That __iter__ should actually be __init__, of course. -- http://mail.python.org/mailman/listinfo/python-list