Ben Hoyt firstname.lastname@example.org writes:
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.* ... http://legacy.python.org/dev/peps/pep-0471/ ... Specifically, this PEP proposes adding a single function to the ``os`` module in the standard library, ``scandir``, that takes a single, optional string as its argument::
scandir(path='.') -> generator of DirEntry objects
Have you considered adding support for paths relative to directory descriptors  via keyword only dir_fd=None parameter if it may lead to more efficient implementations on some platforms?