[Python-checkins] docs: clarify what patterns Path.glob accepts (GH-25486)

miss-islington webhook-mailer at python.org
Tue Apr 20 12:45:51 EDT 2021


https://github.com/python/cpython/commit/b2b6cd00c6329426fc3b34700f2e22155b44168c
commit: b2b6cd00c6329426fc3b34700f2e22155b44168c
branch: master
author: Ned Batchelder <ned at nedbatchelder.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-04-20T09:45:45-07:00
summary:

docs: clarify what patterns Path.glob accepts (GH-25486)



Automerge-Triggered-By: GH:Yhg1s

files:
M Doc/library/pathlib.rst

diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index f15fed3f02a04..122642ad5a41e 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'),



More information about the Python-checkins mailing list