summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-04-20 16:45:45 (GMT)
committerGitHub <noreply@github.com>2021-04-20 16:45:45 (GMT)
commitb2b6cd00c6329426fc3b34700f2e22155b44168c (patch)
treeb0d3ce0465a597cda891442b439350936deb2862
parent3309113d6131e4bbac570c4f54175ecca02d025a (diff)
downloadcpython-b2b6cd00c6329426fc3b34700f2e22155b44168c.zip
cpython-b2b6cd00c6329426fc3b34700f2e22155b44168c.tar.gz
cpython-b2b6cd00c6329426fc3b34700f2e22155b44168c.tar.bz2
docs: clarify what patterns Path.glob accepts (GH-25486)
Automerge-Triggered-By: GH:Yhg1s
-rw-r--r--Doc/library/pathlib.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index f15fed3..122642a 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -798,8 +798,9 @@ call fails (for example because the path doesn't exist).
>>> sorted(Path('.').glob('*/*.py'))
[PosixPath('docs/conf.py')]
- The "``**``" pattern means "this directory and all subdirectories,
- recursively". In other words, it enables recursive globbing::
+ Patterns are the same as for :mod:`fnmatch`, with the addition of "``**``"
+ which means "this directory and all subdirectories, recursively". In other
+ words, it enables recursive globbing::
>>> sorted(Path('.').glob('**/*.py'))
[PosixPath('build/lib/pathlib.py'),