Author vstinner
Recipients benhoyt, python-dev, scott.dial, vstinner
Date 2015-03-10.12:26:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1425990415.13.0.447937017487.issue23605@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2015-03-10 12:26:55vstinnersetrecipients: + vstinner, scott.dial, benhoyt, python-dev
2015-03-10 12:26:55vstinnersetmessageid: <1425990415.13.0.447937017487.issue23605@psf.upfronthosting.co.za>
2015-03-10 12:26:55vstinnerlinkissue23605 messages
2015-03-10 12:26:54vstinnercreate