summaryrefslogtreecommitdiffstats
path: root/Lib/genericpath.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-08-02 23:11:33 (GMT)
committerGitHub <noreply@github.com>2019-08-02 23:11:33 (GMT)
commita49f203e052c6fb1244d4e55c3fccc439dda0e2e (patch)
tree7938e0186dc1af3c16c07f459da4df185bc4f8c7 /Lib/genericpath.py
parent1ff7dd681c7f3e31524bfada6d6d2786d4e37704 (diff)
downloadcpython-a49f203e052c6fb1244d4e55c3fccc439dda0e2e.zip
cpython-a49f203e052c6fb1244d4e55c3fccc439dda0e2e.tar.gz
cpython-a49f203e052c6fb1244d4e55c3fccc439dda0e2e.tar.bz2
bpo-30974: Change os.path.samefile docstring to match docs (GH-7337)
(cherry picked from commit 8e568ef266a2805f9a6042003723d9c050830461) Co-authored-by: Timo Furrer <tuxtimo@gmail.com>
Diffstat (limited to 'Lib/genericpath.py')
-rw-r--r--Lib/genericpath.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/genericpath.py b/Lib/genericpath.py
index 303b3b3..85f4a57 100644
--- a/Lib/genericpath.py
+++ b/Lib/genericpath.py
@@ -92,7 +92,11 @@ def samestat(s1, s2):
# Are two filenames really pointing to the same file?
def samefile(f1, f2):
- """Test whether two pathnames reference the same actual file"""
+ """Test whether two pathnames reference the same actual file or directory
+
+ This is determined by the device number and i-node number and
+ raises an exception if an os.stat() call on either pathname fails.
+ """
s1 = os.stat(f1)
s2 = os.stat(f2)
return samestat(s1, s2)