Message239377
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? |
|
Date |
User |
Action |
Args |
2015-03-27 07:38:56 | vstinner | set | recipients:
+ vstinner, scott.dial, benhoyt, python-dev, serhiy.storchaka |
2015-03-27 07:38:56 | vstinner | link | issue23605 messages |
2015-03-27 07:38:55 | vstinner | create | |
|