STINNER Victor added the comment:

My suggestion to add a new walk_dirs list is wrong: os.walk() documentation 
explicitly says that the dirs list can be modified to delete some directories:
https://docs.python.org/dev/library/os.html#os.walk
"""
When topdown is True, the caller can modify the dirnames list in-place (perhaps 
using del or slice assignment), and walk() will only recurse into the 
subdirectories whose names remain in dirnames; this can be used to prune the 
search, impose a specific order of visiting, or even to inform walk() about 
directories the caller creates or renames before it resumes walk() again.
"""

os_walk_1.patch is inefficient: it also calls entry.is_symlink() for file 
entries.

I reworked your patch to only call is_symlink() for directories.

Thanks for the patch Ben. I think that we are now done with the PEP 471 no? 
Maybe some doc changes (I'm now reviewing your doc change in issue #22524).

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23605>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to