Commit 539c1652 authored by Georg Brandl's avatar Georg Brandl

#6825: small correction to split() docs.

parent 7c4cad51
...@@ -268,14 +268,14 @@ applications should use string objects to access all files. ...@@ -268,14 +268,14 @@ applications should use string objects to access all files.
.. function:: split(path) .. function:: split(path)
Split the pathname *path* into a pair, ``(head, tail)`` where *tail* is the last Split the pathname *path* into a pair, ``(head, tail)`` where *tail* is the
pathname component and *head* is everything leading up to that. The *tail* part last pathname component and *head* is everything leading up to that. The
will never contain a slash; if *path* ends in a slash, *tail* will be empty. If *tail* part will never contain a slash; if *path* ends in a slash, *tail*
there is no slash in *path*, *head* will be empty. If *path* is empty, both will be empty. If there is no slash in *path*, *head* will be empty. If
*head* and *tail* are empty. Trailing slashes are stripped from *head* unless *path* is empty, both *head* and *tail* are empty. Trailing slashes are
it is the root (one or more slashes only). In nearly all cases, ``join(head, stripped from *head* unless it is the root (one or more slashes only). In
tail)`` equals *path* (the only exception being when there were multiple slashes all cases, ``join(head, tail)`` returns a path to the same location as *path*
separating *head* from *tail*). (but the strings may differ).
.. function:: splitdrive(path) .. function:: splitdrive(path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment