[Python-Dev] My summary of the scandir (PEP 471)
benhoyt at gmail.com
Wed Jul 2 16:48:50 CEST 2014
Thanks for the clarifications and support.
> Ah, the wording in the PEP says "Linux, Windows, OS X". Superficially,
> that said "everywhere" to me. It might be worth calling out
> specifically some examples where it's not available without an extra
> system call, just to make the point explicit.
Good call. I'll update the wording in the PEP here and try to call out
specific examples of where is_dir() could call os.stat().
Hard-core POSIX people, do you know when readdir() d_type will be
DT_UNKNOWN on (for example) Linux or OS X? I suspect this can happen
on certain network filesystems, but I'm not sure.
> PS I'd suggest adding a "Rejected proposals" section to the PEP which
> mentions the race condition issue and points to this discussion as an
> indication that people didn't seem to see it as a problem.
Definitely agreed. I'll add this, and clarify various other issues in
the PEP, and then repost.
More information about the Python-Dev