[issue42778] Add follow_symlinks=True parameter to both os.path.samefile() and Path.samefile()
Serhiy Storchaka
report at bugs.python.org
Wed Jan 20 05:27:09 EST 2021
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
Why is this feature needed? Currently you can use a combination of samestat() with lstat(). And more, you can follow symbolic links only for one of arguments.
samestat(stat(path1), stat(path1)) # same as samefile(path1, path1)
samestat(lstat(path1), stat(path1))
samestat(stat(path1), lstat(path1))
samestat(lstat(path1), lstat(path1))
samefile() covers one (presumably most common) of these cases. The proposed option would cover yet one (is it common enough?). And there are two mixed cases remained.
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42778>
_______________________________________
More information about the Python-bugs-list
mailing list