mirror of
https://github.com/python/cpython.git
synced 2024-12-15 12:54:31 +08:00
docs: clarify what patterns Path.glob accepts (GH-25486)
Automerge-Triggered-By: GH:Yhg1s
This commit is contained in:
parent
3309113d61
commit
b2b6cd00c6
@ -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'),
|
||||
|
Loading…
Reference in New Issue
Block a user