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/2012-January/115458.html below:

[Python-Dev] os.walk() with followlinks=False

[Python-Dev] os.walk() with followlinks=False [Python-Dev] os.walk() with followlinks=FalseAntoine Pitrou solipsis at pitrou.net
Wed Jan 11 15:54:05 CET 2012
On Wed, 11 Jan 2012 12:25:46 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
> When discussing http://bugs.python.org/issue13734, Charles-François
> noted that when os.walk() is called with "followlinks=False", symlinks
> to directories are still included in the "subdirs" list rather than
> the "files" list.
> 
> This seems rather odd to me, so I'm asking here to see if there's a
> specific rationale for it, or if it's just an artifact of the
> implementation.
> 
> If it's the latter... could we change it for 3.3, or is that too
> significant a breach of backwards compatibility?

I think we could change it.

> Even if we can't change os.walk(), does os.walkfd() need to replicate
> the annoying behaviour for consistency, or can it instead consider
> such symlinks to be files rather than directories?

IMO walkfd() should do the right thing.

Regards

Antoine.


More information about the Python-Dev mailing list

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