[Python-checkins] bpo-30974: Change os.path.samefile docstring to match docs (GH-7337)

Miss Islington (bot) webhook-mailer at python.org
Fri Aug 2 19:04:57 EDT 2019


https://github.com/python/cpython/commit/6b833901fe9053937c289c6371bb731c9aceb58e
commit: 6b833901fe9053937c289c6371bb731c9aceb58e
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-08-02T16:04:53-07:00
summary:

bpo-30974: Change os.path.samefile docstring to match docs (GH-7337)

(cherry picked from commit 8e568ef266a2805f9a6042003723d9c050830461)

Co-authored-by: Timo Furrer <tuxtimo at gmail.com>

files:
M Lib/genericpath.py

diff --git a/Lib/genericpath.py b/Lib/genericpath.py
index 5dd703d736c5..db11f67d54cc 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)



More information about the Python-checkins mailing list