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

Ethan Furman ethan at stoneleaf.us
Thu Jul 10 19:53:45 CEST 2014


On 07/10/2014 06:58 AM, Nick Coghlan wrote:
>
> The info we want for scandir is that of the *link itself*. That makes it
> easy to implement things like the "followlinks" flag of os.walk. The
>  *far end* of the link isn't relevant at this level.

This also mirrors listdir, correct?  scandir is simply* returning something smarter than a string.

> The docs just need to be clear that DirEntry objects always match lstat(), never stat().

Agreed.

--
~Ethan~

* As well as being a less resource-intensive generator.  :)


More information about the Python-Dev mailing list