8000 bpo-30974: Change os.path.samefile docstring to match docs (GH-7337) · miss-islington/cpython@5fe3f61 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5fe3f61

Browse files
timofurrermiss-islington
authored andcommitted
bpo-30974: Change os.path.samefile docstring to match docs (pythonGH-7337)
(cherry picked from commit 8e568ef) Co-authored-by: Timo Furrer <tuxtimo@gmail.com>
1 parent 79af3bd commit 5fe3f61

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)
0