Le mardi 15 juillet 2014, Ben Hoyt <benh...@gmail.com> a écrit : > > > Victor had one other question: > > > What happens to name and full_name 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
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com