]> granicus.if.org Git - python/commitdiff
Document the new join() semantics.
authorBarry Warsaw <barry@python.org>
Tue, 18 Feb 1997 21:53:53 +0000 (21:53 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 18 Feb 1997 21:53:53 +0000 (21:53 +0000)
Doc/lib/libppath.tex
Doc/libppath.tex

index d43d3e13d9f21958a77d7559b379a7d4fb1f26d8..7aec4b83705d2d770f3e2a79fa4205d608464ac9 100644 (file)
@@ -79,22 +79,12 @@ different device than \var{p}, or whether \file{\var{p}/..} and
 detect mount points for all \UNIX{} and POSIX variants.
 \end{funcdesc}
 
-\begin{funcdesc}{join}{p\, q}
-Join the paths
-\var{p}
-and
-\var{q} intelligently:
-If
-\var{q}
-is an absolute path, the return value is
-\var{q}.
-Otherwise, the concatenation of
-\var{p}
-and
-\var{q}
-is returned, with a slash (\code{'/'}) inserted unless
-\var{p}
-is empty or ends in a slash.
+\begin{funcdesc}{join}{p\optional{\, q\optional{\, ...}}}
+Joins one or more path components intelligently.  If any component is
+an absolute path, all previous components are thrown away, and joining
+continues.  The return value is the concatenation of \var{p}, and
+optionally \var{q}, etc., with exactly one slash (\code{'/'}) inserted
+between components, unless \var{p} is empty.
 \end{funcdesc}
 
 \begin{funcdesc}{normcase}{p}
index d43d3e13d9f21958a77d7559b379a7d4fb1f26d8..7aec4b83705d2d770f3e2a79fa4205d608464ac9 100644 (file)
@@ -79,22 +79,12 @@ different device than \var{p}, or whether \file{\var{p}/..} and
 detect mount points for all \UNIX{} and POSIX variants.
 \end{funcdesc}
 
-\begin{funcdesc}{join}{p\, q}
-Join the paths
-\var{p}
-and
-\var{q} intelligently:
-If
-\var{q}
-is an absolute path, the return value is
-\var{q}.
-Otherwise, the concatenation of
-\var{p}
-and
-\var{q}
-is returned, with a slash (\code{'/'}) inserted unless
-\var{p}
-is empty or ends in a slash.
+\begin{funcdesc}{join}{p\optional{\, q\optional{\, ...}}}
+Joins one or more path components intelligently.  If any component is
+an absolute path, all previous components are thrown away, and joining
+continues.  The return value is the concatenation of \var{p}, and
+optionally \var{q}, etc., with exactly one slash (\code{'/'}) inserted
+between components, unless \var{p} is empty.
 \end{funcdesc}
 
 \begin{funcdesc}{normcase}{p}