]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Further improve os.path.commonprefix() docs.
authorYury Selivanov <yselivanov@sprymix.com>
Wed, 19 Aug 2015 13:53:28 +0000 (09:53 -0400)
committerYury Selivanov <yselivanov@sprymix.com>
Wed, 19 Aug 2015 13:53:28 +0000 (09:53 -0400)
Patch by Serhiy Storchaka.

Doc/library/os.path.rst

index 041277cd9c85aa3f34e720ec4ecc0c8ee0ef4c0c..a3fe73c1523b571312366d17d190dcc45dc0994b 100644 (file)
@@ -92,11 +92,11 @@ the :mod:`glob` module.)
 
       ::
 
-        >>> os.path.commonprefix(['/dir1/dir2', '/dir3/dir4'])
-        '/dir'
+        >>> os.path.commonprefix(['/usr/lib', '/usr/local/lib'])
+        '/usr/l'
 
-        >>> os.path.commonpath(['/dir1/dir2', '/dir3/dir4'])
-        '/'
+        >>> os.path.commonpath(['/usr/lib', '/usr/local/lib'])
+        '/usr'
 
 
 .. function:: dirname(path)