summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-07-20 21:47:43 (GMT)
committerGitHub <noreply@github.com>2022-07-20 21:47:43 (GMT)
commit6e2fbdab9220e20bc0e7f9e20987bb1e18532585 (patch)
tree2bf0c37d0b69a23c830d6ea4a29414d00b7dd9ec
parentfd4a42d8902107647f9b7b0b6a6247e7d5253fa7 (diff)
downloadcpython-6e2fbdab9220e20bc0e7f9e20987bb1e18532585.zip
cpython-6e2fbdab9220e20bc0e7f9e20987bb1e18532585.tar.gz
cpython-6e2fbdab9220e20bc0e7f9e20987bb1e18532585.tar.bz2
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
-rw-r--r--Doc/library/pathlib.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index d5cda3a..0454918 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -1122,8 +1122,8 @@ call fails (for example because the path doesn't exist).
.. method:: Path.rglob(pattern)
- This is like calling :func:`Path.glob` with "``**/``" added in front of the
- given relative *pattern*::
+ Glob the given relative *pattern* recursively. This is like calling
+ :func:`Path.glob` with "``**/``" added in front of the *pattern*::
>>> sorted(Path().rglob("*.py"))
[PosixPath('build/lib/pathlib.py'),