summaryrefslogtreecommitdiff
path: root/Lib/genericpath.py
diff options
context:
space:
mode:
authorTimo Furrer <tuxtimo@gmail.com>2019-08-03 00:44:25 +0200
committerSteve Dower <steve.dower@python.org>2019-08-02 15:44:25 -0700
commit8e568ef266a2805f9a6042003723d9c050830461 (patch)
treea5e5c2e98e2ddfea0a372eb2a0dea7b47ae5e423 /Lib/genericpath.py
parent7ea9a85f132b32347fcbd2cbe1b553a2e9890b56 (diff)
downloadcpython-git-8e568ef266a2805f9a6042003723d9c050830461.tar.gz
bpo-30974: Change os.path.samefile docstring to match docs (GH-7337)
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 5dd703d736..db11f67d54 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)