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

Skip to content

Commit 0256c1f

Browse files
committed
Document splitdrive().
For all split*(), these split path *into* pairs, not split path *in* pairs. "Into" can be used for transformations, "in" is for containment.
1 parent ead9d8d commit 0256c1f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

Doc/lib/libposixpath.tex

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ \section{\module{os.path} ---
138138
\end{funcdesc}
139139

140140
\begin{funcdesc}{split}{path}
141-
Split the pathname \var{path} in a pair \code{(\var{head},
141+
Split the pathname \var{path} into a pair \code{(\var{head},
142142
\var{tail})}, where \var{tail} is the last pathname component and
143143
\var{head} is everything leading up to that. The \var{tail} part will
144144
never contain a slash; if \var{path} ends in a slash, \var{tail} will
@@ -151,8 +151,16 @@ \section{\module{os.path} ---
151151
from \var{tail}).
152152
\end{funcdesc}
153153

154+
\begin{funcdesc}{splitdrive}{path}
155+
Split the pathname \var{path} into a pair \code{(\var{drive},
156+
\var{tail})}, where \var{drive} is either a drive specification or the
157+
empty string. On systems which do not use drive specifications,
158+
\var{drive} will always be the empty string. In all cases,
159+
\code{\var{drive} + \var{tail}} will be the same as \var{path}.
160+
\end{funcdesc}
161+
154162
\begin{funcdesc}{splitext}{path}
155-
Split the pathname \var{path} in a pair \code{(\var{root}, \var{ext})}
163+
Split the pathname \var{path} into a pair \code{(\var{root}, \var{ext})}
156164
such that \code{\var{root} + \var{ext} == \var{path}},
157165
and \var{ext} is empty or begins with a period and contains
158166
at most one period.

0 commit comments

Comments
 (0)