summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorJürgen Gmach <juergen.gmach@googlemail.com>2023-01-20 22:11:31 (GMT)
committerGitHub <noreply@github.com>2023-01-20 22:11:31 (GMT)
commit61f338a005aa9f36b2a0a8d6924857e703bb6140 (patch)
tree238d01b806cd8cc5df9edbe7e910ea87de03a38c /Doc
parentf1d0711dd33bdd6485082116ddaca004c225b62f (diff)
downloadcpython-61f338a005aa9f36b2a0a8d6924857e703bb6140.zip
cpython-61f338a005aa9f36b2a0a8d6924857e703bb6140.tar.gz
cpython-61f338a005aa9f36b2a0a8d6924857e703bb6140.tar.bz2
GH-101112: Specify type of pattern for Path.rglob (#101132)
The documentation for `rglob` did not mention what `pattern` actually is. Mentioning and linking to `fnmatch` makes this explicit, as the documentation for `fnmatch` both shows the syntax and some explanation.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/pathlib.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index c5cf409..42d63b1 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -1270,7 +1270,8 @@ call fails (for example because the path doesn't exist).
.. method:: Path.rglob(pattern)
Glob the given relative *pattern* recursively. This is like calling
- :func:`Path.glob` with "``**/``" added in front of the *pattern*::
+ :func:`Path.glob` with "``**/``" added in front of the *pattern*, where
+ *patterns* are the same as for :mod:`fnmatch`::
>>> sorted(Path().rglob("*.py"))
[PosixPath('build/lib/pathlib.py'),