diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-18 03:43:54 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-18 03:43:54 (GMT) |
commit | 02aa3426d393642999bb4f0e1a3125b9391ca399 (patch) | |
tree | 7cc5f8e292efc0c6c304c7af6c18ea36c28c515f /Doc | |
parent | 84086acb475a1fc7095c733b6a8bb523d623fa16 (diff) | |
parent | 80ac11f95f1c6b3f11f25de074a2d6eb1e261dc2 (diff) | |
download | cpython-02aa3426d393642999bb4f0e1a3125b9391ca399.zip cpython-02aa3426d393642999bb4f0e1a3125b9391ca399.tar.gz cpython-02aa3426d393642999bb4f0e1a3125b9391ca399.tar.bz2 |
Merge 3.5
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/os.path.rst | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst index e4fe44e..041277c 100644 --- a/Doc/library/os.path.rst +++ b/Doc/library/os.path.rst @@ -82,8 +82,21 @@ the :mod:`glob` module.) Return the longest path prefix (taken character-by-character) that is a prefix of all paths in *list*. If *list* is empty, return the empty string - (``''``). Note that this may return invalid paths because it works a - character at a time. To obtain a valid path, see :func:`commonpath`. + (``''``). + + .. note:: + + This function may return invalid paths because it works a + character at a time. To obtain a valid path, see + :func:`commonpath`. + + :: + + >>> os.path.commonprefix(['/dir1/dir2', '/dir3/dir4']) + '/dir' + + >>> os.path.commonpath(['/dir1/dir2', '/dir3/dir4']) + '/' .. function:: dirname(path) |