Skip to content

Commit 61f338a

Browse files
authored
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.
1 parent f1d0711 commit 61f338a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/library/pathlib.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,8 @@ call fails (for example because the path doesn't exist).
12701270
.. method:: Path.rglob(pattern)
12711271

12721272
Glob the given relative *pattern* recursively. This is like calling
1273-
:func:`Path.glob` with "``**/``" added in front of the *pattern*::
1273+
:func:`Path.glob` with "``**/``" added in front of the *pattern*, where
1274+
*patterns* are the same as for :mod:`fnmatch`::
12741275

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

0 commit comments

Comments
 (0)