[Python-Dev] Updates to PEP 471, the os.scandir() proposal

Ethan Furman ethan at stoneleaf.us
Tue Jul 8 23:05:22 CEST 2014

On 07/08/2014 01:22 PM, Ethan Furman wrote:
> I think caching the attributes for DirEntry is fine, but let's do it as a snapshot of that moment in time, not name now,
> and attributes in 30 minutes when we finally get to you because we had a lot of processing/files ahead of you (you being
> a DirEntry ;) .

This bit is wrong, I think, since scandir is a generator -- there wouldn't be much time passing between the direntry 
call and the stat call in any case.  Hopefully my other points still hold.


More information about the Python-Dev mailing list