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

Automerge-Triggered-By: GH:Yhg1s
This commit is contained in:
Ned Batchelder 2021-04-20 12:45:45 -04:00 committed by GitHub
parent 3309113d61
commit b2b6cd00c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'),