Documentation
Unless I am in some way confused, that statement is incorrect. The function only accepts stat objects.
|
# Are two stat buffers (obtained from stat, fstat or lstat) |
|
# describing the same file? |
|
def samestat(s1, s2): |
|
"""Test whether two stat buffers reference the same file""" |
|
return (s1.st_ino == s2.st_ino and |
|
s1.st_dev == s2.st_dev) |
Linked PRs
Documentation
Unless I am in some way confused, that statement is incorrect. The function only accepts
statobjects.cpython/Lib/genericpath.py
Lines 121 to 126 in 624bf52
Linked PRs
os.path.samestataccepts file-like objects #136683os.path.samestataccepts file-like objects (GH-136683) #136684os.path.samestataccepts file-like objects (GH-136683) #136685