]> granicus.if.org Git - python/commitdiff
Explained that os.path.basename() may return something different from the
authorFred Drake <fdrake@acm.org>
Thu, 26 Oct 2000 21:38:23 +0000 (21:38 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 26 Oct 2000 21:38:23 +0000 (21:38 +0000)
basename program, as suggested by Gregor Hoffleit <gregor@hoffleit.de>.

This closes bug #119485.

Doc/lib/libposixpath.tex

index 66e278100c81a4ace70a3eae66888c6cf1470980..f585f41c4245fcf461cd66afb64e6ce841978dcd 100644 (file)
@@ -17,7 +17,11 @@ On most platforms, this is equivalent to
 
 \begin{funcdesc}{basename}{path}
 Return the base name of pathname \var{path}.  This is the second half
-of the pair returned by \code{split(\var{path})}.
+of the pair returned by \code{split(\var{path})}.  Note that the
+result of this function is different from the
+\UNIX{} \program{basename} program; where \program{basename} for
+\code{'/foo/bar/'} returns \code{'bar'}, the \function{basename()}
+function returns an empty string (\code{''}).
 \end{funcdesc}
 
 \begin{funcdesc}{commonprefix}{list}