]> granicus.if.org Git - python/commitdiff
bpo-30974: Change os.path.samefile docstring to match docs (GH-7337)
authorTimo Furrer <tuxtimo@gmail.com>
Fri, 2 Aug 2019 22:44:25 +0000 (00:44 +0200)
committerSteve Dower <steve.dower@python.org>
Fri, 2 Aug 2019 22:44:25 +0000 (15:44 -0700)
Lib/genericpath.py

index 5dd703d736c50984cb69ad074b75fba6b86404d8..db11f67d54cc2f8b468294da231ee37c7781362e 100644 (file)
@@ -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)