On 2014-06-26 23:59, Ben Hoyt wrote:
Hi Python dev folks,
I've written a PEP proposing a specific os.scandir() API for a directory iterator that returns the stat-like info from the OS, the main advantage of which is to speed up os.walk() and similar operations between 4-20x, depending on your OS and file system. Full details, background info, and context links are in the PEP, which Victor Stinner has uploaded at the following URL, and I've also copied inline below.
Would love feedback on the PEP, but also of course on the proposal itself.
[snip] Personally, I'd prefer the name 'iterdir' because it emphasises that it's an iterator.