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/2014-July/135493.html below:

[Python-Dev] Remaining decisions on PEP 471 -- os.scandir()

[Python-Dev] Remaining decisions on PEP 471 -- os.scandir() [Python-Dev] Remaining decisions on PEP 471 -- os.scandir()Victor Stinner victor.stinner at gmail.com
Mon Jul 14 10:25:48 CEST 2014
2014-07-14 4:17 GMT+02:00 Nick Coghlan <ncoghlan at gmail.com>:
> Or the ever popular symlink to "." (or a directory higher in the tree).

"." and ".." are explicitly ignored by os.listdir() an os.scandir().

> I think os.walk() is a good source of inspiration here: call the flag
> "followlink" and default it to False.

IMO the specific function os.walk() is not a good example. It includes
symlinks to directories in the dirs list and then it does not follow
symlink, it is a recursive function and has a followlinks optional
parameter (default: False).

Moreover, in 92% of cases, functions using os.listdir() and
os.path.isdir() *follow* symlinks:
https://mail.python.org/pipermail/python-dev/2014-July/135435.html

Victor
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