On Thu, Sep 22, 2016 at 3:15 AM, Random832 <random...@fastmail.com> wrote: > Or you can give up on recursion. Recursive tree traversal is generally > associated with passing in a callback in rather than implementing an > iterable-like interface that can be used with a caller's for-loop > anyway. >
Maybe in languages that don't _have_ good generators, but in Python, the obvious way to iterate over something is with an iterator, not a callback. ChrisA -- https://mail.python.org/mailman/listinfo/python-list