This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients benhoyt, python-dev, scott.dial, serhiy.storchaka, vstinner
Date 2015-03-27.07:38:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwbf7y1FSsyimy6fWx71NbEgoib5SuBmqjT=STDNmZxz-g@mail.gmail.com>
In-reply-to <1427422597.73.0.399490895717.issue23605@psf.upfronthosting.co.za>
Content
Ben Hoyt added the comment:
> 1) The new implementation is more complex. Of course, most of this is
necessary due to the topdown directory issue.

Sure,  correctness matters more than performances.

> However, one thing I'm not sure about is why you create scandir_it
manually and use a while True loop,

The idea is to control lines where OSError is catched to call onerrror(),
without breaking backward compatibility. Especially, onerror() should only
be called once, even for recursive calls.

> 2) In this commit http://bugs.python.org/review/23605/diff/14181/Lib/os.py
-- which is not the final one, I don't quite understand the catch_oserror
thing.
It's just a try to write differently the same thing. It didn't convince
myself that it's more readable, so I picked the first version.

What's your point about complexity? Would you like to drop os.scandir
changes in os.walk(), or do you have a simpler version to propose?
History
Date User Action Args
2015-03-27 07:38:56vstinnersetrecipients: + vstinner, scott.dial, benhoyt, python-dev, serhiy.storchaka
2015-03-27 07:38:56vstinnerlinkissue23605 messages
2015-03-27 07:38:55vstinnercreate