From 43aacb406ec46b34692ab48b3b4669a8626d45fd Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 20 Jul 2022 14:47:43 -0700 Subject: [PATCH] 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 (cherry picked from commit 6e2fbdab9220e20bc0e7f9e20987bb1e18532585) Co-authored-by: Ned Batchelder --- Doc/library/pathlib.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index f969b1104f0890..14f5c3a8642bc5 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -1107,8 +1107,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'),