Skip to content

Commit 43aacb4

Browse files
nedbatmiss-islington
authored andcommitted
docs: use 'recursively' in the description of rglob, and mention globs in the os equivalences (pythonGH-94954)
The r in `rglob` stands for "recursively", so use the word in the description. Also, glob and rglob can usefully be mentioned as the pathlib equivalent of os.walk. Automerge-Triggered-By: GH:brettcannon (cherry picked from commit 6e2fbda) Co-authored-by: Ned Batchelder <[email protected]>
1 parent cbe3ad5 commit 43aacb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/pathlib.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,8 +1107,8 @@ call fails (for example because the path doesn't exist).
11071107

11081108
.. method:: Path.rglob(pattern)
11091109

1110-
This is like calling :func:`Path.glob` with "``**/``" added in front of the
1111-
given relative *pattern*::
1110+
Glob the given relative *pattern* recursively. This is like calling
1111+
:func:`Path.glob` with "``**/``" added in front of the *pattern*::
11121112

11131113
>>> sorted(Path().rglob("*.py"))
11141114
[PosixPath('build/lib/pathlib.py'),

0 commit comments

Comments
 (0)