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

Paul Moore p.f.moore at gmail.com
Sun Jun 29 13:45:49 CEST 2014


On 29 June 2014 12:08, Nick Coghlan <ncoghlan at gmail.com> wrote:

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).

If it matters that much we could simply call it cached_lstat(). It's ugly, but I really don't like the idea of throwing the information away - after all, the fact that we currently throw data away is why there's even a need for scandir. Let's not make the same mistake again...

Paul



More information about the Python-Dev mailing list