Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3aecfc9

Browse files
committed
Explained that os.path.basename() may return something different from the
basename program, as suggested by Gregor Hoffleit <[email protected]>. This closes bug #119485.
1 parent 4532dc1 commit 3aecfc9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Doc/lib/libposixpath.tex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ \section{\module{os.path} ---
1717

1818
\begin{funcdesc}{basename}{path}
1919
Return the base name of pathname \var{path}. This is the second half
20-
of the pair returned by \code{split(\var{path})}.
20+
of the pair returned by \code{split(\var{path})}. Note that the
21+
result of this function is different from the
22+
\UNIX{} \program{basename} program; where \program{basename} for
23+
\code{'/foo/bar/'} returns \code{'bar'}, the \function{basename()}
24+
function returns an empty string (\code{''}).
2125
\end{funcdesc}
2226

2327
\begin{funcdesc}{commonprefix}{list}

0 commit comments

Comments
 (0)