Skip to content

Commit 0e75a55

Browse files
committed
Adjust first paragraph to use prose
... and not belabour the fact that the empty string may be returned as any/all items.
1 parent 5a8dfce commit 0e75a55

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Doc/library/os.path.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,11 @@ the :mod:`glob` module.)
490490

491491
.. function:: splitroot(path)
492492

493-
Split the pathname *path* into a 3-item tuple ``(drive, root, tail)`` where:
494-
495-
1. *drive* is a device name, mount point or the empty string;
496-
2. *root* is a sequence of separators following the drive or the empty string; and
497-
3. *tail* is anything after the root.
493+
Split the pathname *path* into a 3-item tuple ``(drive, root, tail)`` where
494+
*drive* is a device name or mount point, *root* is a string of separators
495+
after the drive, and *tail* is everything after the root. Any of these
496+
items may be the empty string. In all cases, ``drive + root + tail`` will
497+
be the same as *path*.
498498

499499
On POSIX systems, *drive* is always empty. The *root* may be empty (if *path* is
500500
relative), a single forward slash (if *path* is absolute), or two forward slashes
@@ -518,7 +518,6 @@ the :mod:`glob` module.)
518518
>>> splitroot('//Server/Share/Users/Sam')
519519
('//Server/Share', '/', 'Users/Sam')
520520

521-
In all cases, ``drive + root + tail`` will be the same as *path*.
522521

523522
.. versionadded:: 3.12
524523

0 commit comments

Comments
 (0)