Skip to content

Commit eb33f8f

Browse files
timofurrerlisroach
authored andcommitted
bpo-30974: Change os.path.samefile docstring to match docs (pythonGH-7337)
1 parent fdb0507 commit eb33f8f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/genericpath.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ def samestat(s1, s2):
9292

9393
# Are two filenames really pointing to the same file?
9494
def samefile(f1, f2):
95-
"""Test whether two pathnames reference the same actual file"""
95+
"""Test whether two pathnames reference the same actual file or directory
96+
97+
This is determined by the device number and i-node number and
98+
raises an exception if an os.stat() call on either pathname fails.
99+
"""
96100
s1 = os.stat(f1)
97101
s2 = os.stat(f2)
98102
return samestat(s1, s2)

0 commit comments

Comments
 (0)