[Python-Dev] PEP 471 (scandir): Add a new DirEntry.inode() method?

Ben Hoyt benhoyt at gmail.com
Sat Feb 14 22:25:42 CET 2015


>> The whole point of scandir is to expose low-level system calls in a
>> cross-platform way.
>
> Cross-platform is great and preferable, but low-level system facilities
> should be made available even when they are unique to a particular OS.

Yes, but this can be made cross-platform fairly easily, just like the
other method calls. Just like DirEntry.stat() has different
cross-platform operation (no stat call on Windows, a stat call on
POSIX), DirEntry.inode() would have a different operation (stat call
on Windows, no stat call on POSIX).

-Ben


More information about the Python-Dev mailing list