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

Skip to content

Commit 539c165

Browse files
committed
#6825: small correction to split() docs.
1 parent 7c4cad5 commit 539c165

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Doc/library/os.path.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,14 @@ applications should use string objects to access all files.
268268

269269
.. function:: split(path)
270270

271-
Split the pathname *path* into a pair, ``(head, tail)`` where *tail* is the last
272-
pathname component and *head* is everything leading up to that. The *tail* part
273-
will never contain a slash; if *path* ends in a slash, *tail* will be empty. If
274-
there is no slash in *path*, *head* will be empty. If *path* is empty, both
275-
*head* and *tail* are empty. Trailing slashes are stripped from *head* unless
276-
it is the root (one or more slashes only). In nearly all cases, ``join(head,
277-
tail)`` equals *path* (the only exception being when there were multiple slashes
278-
separating *head* from *tail*).
271+
Split the pathname *path* into a pair, ``(head, tail)`` where *tail* is the
272+
last pathname component and *head* is everything leading up to that. The
273+
*tail* part will never contain a slash; if *path* ends in a slash, *tail*
274+
will be empty. If there is no slash in *path*, *head* will be empty. If
275+
*path* is empty, both *head* and *tail* are empty. Trailing slashes are
276+
stripped from *head* unless it is the root (one or more slashes only). In
277+
all cases, ``join(head, tail)`` returns a path to the same location as *path*
278+
(but the strings may differ).
279279

280280

281281
.. function:: splitdrive(path)

0 commit comments

Comments
 (0)