A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-April/034904.html below:

[Python-Dev] os.path.walk() lacks 'depth first' option

[Python-Dev] os.path.walk() lacks 'depth first' option [Python-Dev] os.path.walk() lacks 'depth first' optionWalter Dörwald walter@livinglogic.de
Tue, 22 Apr 2003 17:57:12 +0200
Guido van Rossum wrote:

>>Guido van Rossum wrote:
>>
>>>But if I had to do it over again, I wouldn't have added walk() in the
>>>current form.
>>
>>I think it's the perfect place for a generator.

Has anybody considered Jason Orendorff's path module
(http://www.jorendorff.com/articles/python/path/)
for inclusion in the standard library? It has a path walking
generator and much, much more.

> Absolutely!  So let's try to write something new based on generators,
> make it flexible enough so that it can handle pre-order or post-order
> visits, and then phase out os.walk().

This new generator should probably support callbacks that determine
whether directories should be entered or not.

Bye,
    Walter Dörwald





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4