dirwalk.py generator version of os.path.walk
Jim Dennis
jimd at vega.starshine.org
Sun Mar 3 00:10:55 EST 2002
In article <mailman.1014959642.30993.python-list at python.org>, Tim Peters wrote:
>
>[Jim Dennis]
>> I guess I'm just wary of recursion, particularly when I've read
>> that Python doesn't support tail-end recursion.
> If I were Jim, I'd continue leaving recursion out of this specific
> application. An explicit "todo list" trivially supports either
> breadth-first or depth-first traversal (a choice Jim explicitly mentioned as
> something he wants to control). Calling it "a stack" is an illusion
> suffered by those blindly embracing recursion <wink>.
Calling it a "stack" was actually a bad idea. It's an aggenda or
a todo list, that might be used as a FIFO or a stack --- or even
in some arbitrary order.
However, it made the intent reasonably clear, even it it was a
tiny bit misleading.
More information about the Python-list
mailing list