[Python-Dev] PEP 471 -- os.scandir() function -- a better and faster directory iterator

Nick Coghlan ncoghlan at gmail.com
Sun Jun 29 13:08:36 CEST 2014


On 29 June 2014 20:52, Steven D'Aprano <steve at pearwood.info> wrote:
> Speaking of caching, is there a way to freshen the cached values?

Switch to a full Path object instead of relying on the cached DirEntry data.

This is what makes me wary of including lstat, even though Windows
offers it without the extra stat call. Caching behaviour is *really*
hard to make intuitive, especially when it *sometimes* returns data
that looks fresh (as it on first call on POSIX systems).

Regards,
Nick.


-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list