diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-11-26 04:38:01 (GMT) |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-11-26 04:38:01 (GMT) |
commit | 0b502ff33b107d5e30f8e2176ac88f7a0993c8d0 (patch) | |
tree | 0989dfc0011fe634202df2ab0ef795ec167320d1 /Doc/library/os.path.rst | |
parent | d27e05d7345c80f6bda15187f01887e3be2c49c8 (diff) | |
download | cpython-0b502ff33b107d5e30f8e2176ac88f7a0993c8d0.zip cpython-0b502ff33b107d5e30f8e2176ac88f7a0993c8d0.tar.gz cpython-0b502ff33b107d5e30f8e2176ac88f7a0993c8d0.tar.bz2 |
Add hyperlinks to the docs of some os.path functions (issue #16552).
Diffstat (limited to 'Doc/library/os.path.rst')
-rw-r--r-- | Doc/library/os.path.rst | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst index 214e27c..22272a7 100644 --- a/Doc/library/os.path.rst +++ b/Doc/library/os.path.rst @@ -43,13 +43,15 @@ applications should use string objects to access all files. .. function:: abspath(path) Return a normalized absolutized version of the pathname *path*. On most - platforms, this is equivalent to ``normpath(join(os.getcwd(), path))``. + platforms, this is equivalent to calling the function :func:`normpath` as + follows: ``normpath(join(os.getcwd(), path))``. .. function:: basename(path) - Return the base name of pathname *path*. This is the second half of the pair - returned by ``split(path)``. Note that the result of this function is different + Return the base name of pathname *path*. This is the second element of the + pair returned by passing *path* to the function :func:`split`. Note that + the result of this function is different from the Unix :program:`basename` program; where :program:`basename` for ``'/foo/bar/'`` returns ``'bar'``, the :func:`basename` function returns an empty string (``''``). @@ -64,8 +66,8 @@ applications should use string objects to access all files. .. function:: dirname(path) - Return the directory name of pathname *path*. This is the first half of the - pair returned by ``split(path)``. + Return the directory name of pathname *path*. This is the first element of + the pair returned by passing *path* to the function :func:`split`. .. function:: exists(path) @@ -276,7 +278,8 @@ applications should use string objects to access all files. *path* is empty, both *head* and *tail* are empty. Trailing slashes are stripped from *head* unless it is the root (one or more slashes only). In all cases, ``join(head, tail)`` returns a path to the same location as *path* - (but the strings may differ). + (but the strings may differ). Also see the functions :func:`dirname` and + :func:`basename`. .. function:: splitdrive(path) |