[Python-Dev] Remaining decisions on PEP 471 -- os.scandir() (original) (raw)
Victor Stinner victor.stinner at gmail.com
Tue Jul 15 08:25:52 CEST 2014
- Previous message: [Python-Dev] Remaining decisions on PEP 471 -- os.scandir()
- Next message: [Python-Dev] Remaining decisions on PEP 471 -- os.scandir()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Le mardi 15 juillet 2014, Ben Hoyt <benhoyt at gmail.com> a écrit :
Victor had one other question: > What happens to name and fullname with followlinks=True? > Do they contain the name in the directory (name of the symlink) > or name of the linked file? I would say they should contain the name and full path of the entry -- the symlink, NOT the linked file. They kind of have to, right, otherwise they'd have to be method calls that potentially call the system.
Sorry, I don't remember who but someone proposed to add the follow_symlinks parameter in scandir() directly. If the parameter is added to methods, there is no such issue.
I like the compromise of adding an optional follow_symlinks to is_xxx() and stat() method. No need for .lstat().
Again: remove any garantee about the cache in the definitions of methods, instead copy the doc from os.path and os. Add a global remark saying that most methods don't need any syscall in general, except for symlinks (with follow_symlinks=True).
Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20140715/cd794d3b/attachment.html>
- Previous message: [Python-Dev] Remaining decisions on PEP 471 -- os.scandir()
- Next message: [Python-Dev] Remaining decisions on PEP 471 -- os.scandir()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]