[Python-Dev] Updates to PEP 471, the os.scandir() proposal
Victor Stinner
victor.stinner at gmail.com
Wed Jul 9 23:38:26 CEST 2014
2014-07-09 22:44 GMT+02:00 Ethan Furman <ethan at stoneleaf.us>:
> On 07/09/2014 01:24 PM, Victor Stinner wrote:
>> Sorry, I didn't follow the whole discussion. IMO DirEntry must use
>> methods and you should not expose nor document which infos are already
>> provided by the OS or not. DirEntry should be a best-effort black-box
>> object providing an API similar to pathlib.Path. is_dir() may be fast?
>> fine, but don't say it in the documentation because Python must remain
>> portable and you should not write code specific to one specific
>> platform.
>
>
> Okay, so using that logic we should head over to the os module and remove: (...)
My comment was specific to the PEP 471, design of the DirEntry class.
Victor
More information about the Python-Dev
mailing list