summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-11-26 04:35:23 (GMT)
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-11-26 04:35:23 (GMT)
commit55b4cfb99295d982b0be5cdd6ae9d552798f240f (patch)
tree3078a7351e80f953ce9c771fe163ce9a143c9bd4
parentb1cc6aa2df228572c5819091a18ac2c0ab6abe5a (diff)
downloadcpython-55b4cfb99295d982b0be5cdd6ae9d552798f240f.zip
cpython-55b4cfb99295d982b0be5cdd6ae9d552798f240f.tar.gz
cpython-55b4cfb99295d982b0be5cdd6ae9d552798f240f.tar.bz2
Add hyperlinks to the docs of some os.path functions (issue #16552).
-rw-r--r--Doc/library/os.path.rst15
1 files changed, 9 insertions, 6 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index 4adc49e..3e84de0c 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -35,15 +35,17 @@ write files see :func:`open`, and for accessing the filesystem see the
.. 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))``.
.. versionadded:: 1.5.2
.. 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 (``''``).
@@ -58,8 +60,8 @@ write files see :func:`open`, and for accessing the filesystem see the
.. 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 @@ write files see :func:`open`, and for accessing the filesystem see the
*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)