diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-11-26 04:42:00 (GMT) |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-11-26 04:42:00 (GMT) |
commit | b48f4ea6010bf1a0ea60e4f4fa9a7f444b5c0290 (patch) | |
tree | be0aa02ea92c456f7b79e39f95c9603a17241d05 /Doc | |
parent | 073f0673697380a00dc2067ab3a999354893df51 (diff) | |
parent | 3b39d35eeb95dbbb46e313d5f702c0fe9f8cdae3 (diff) | |
download | cpython-b48f4ea6010bf1a0ea60e4f4fa9a7f444b5c0290.zip cpython-b48f4ea6010bf1a0ea60e4f4fa9a7f444b5c0290.tar.gz cpython-b48f4ea6010bf1a0ea60e4f4fa9a7f444b5c0290.tar.bz2 |
Merge from 3.3: add hyperlinks to some os.path function docs (issue #16552).
Diffstat (limited to 'Doc')
-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 1053fa3..debfb10 100644 --- a/Doc/library/os.path.rst +++ b/Doc/library/os.path.rst @@ -42,13 +42,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 (``''``). @@ -63,8 +65,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) @@ -281,7 +283,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) |