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/2002-December/031095.html below:

[Python-Dev] os.path.walk generator

[Python-Dev] os.path.walk generator [Python-Dev] os.path.walk generatorGuido van Rossum guido@python.org
Thu, 12 Dec 2002 11:28:54 -0500
> I feel that "The Right Way" to walk through a directory tree is with a 
> generator. Therefore I suggest that a generator
> 
> walk2(topdir, hidden=None)
> 
> be added to os.path. It yields all the files and directories under (and 
> including) "topdir". If "hidden" is true, then hidden files and 
> directories are included.

Submit a patch.

I think hiding 'hidden' files should not be up to the walk() generator
-- os.listdir() and the existing os.path.walk() don't hide them
either.

Style nit: don't use None to indicate False.  Use False.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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