mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
docs: use 'recursively' in the description of rglob, and mention globs in the os equivalences (GH-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
This commit is contained in:
parent
fd4a42d890
commit
6e2fbdab92
1 changed files with 2 additions and 2 deletions
|
@ -1122,8 +1122,8 @@ call fails (for example because the path doesn't exist).
|
||||||
|
|
||||||
.. method:: Path.rglob(pattern)
|
.. method:: Path.rglob(pattern)
|
||||||
|
|
||||||
This is like calling :func:`Path.glob` with "``**/``" added in front of the
|
Glob the given relative *pattern* recursively. This is like calling
|
||||||
given relative *pattern*::
|
:func:`Path.glob` with "``**/``" added in front of the *pattern*::
|
||||||
|
|
||||||
>>> sorted(Path().rglob("*.py"))
|
>>> sorted(Path().rglob("*.py"))
|
||||||
[PosixPath('build/lib/pathlib.py'),
|
[PosixPath('build/lib/pathlib.py'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue