mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-22062: Updated docstring and documentation for pathlib (GH-8519)
Original patch by Mike Short https://bugs.python.org/issue22062
This commit is contained in:
parent
9db56fb8fa
commit
537b6caa56
3 changed files with 7 additions and 5 deletions
|
|
@ -728,7 +728,7 @@ call fails (for example because the path doesn't exist).
|
|||
|
||||
.. method:: Path.glob(pattern)
|
||||
|
||||
Glob the given *pattern* in the directory represented by this path,
|
||||
Glob the given relative *pattern* in the directory represented by this path,
|
||||
yielding all matching files (of any kind)::
|
||||
|
||||
>>> sorted(Path('.').glob('*.py'))
|
||||
|
|
@ -980,8 +980,8 @@ call fails (for example because the path doesn't exist).
|
|||
|
||||
.. method:: Path.rglob(pattern)
|
||||
|
||||
This is like calling :meth:`Path.glob` with "``**``" added in front of the
|
||||
given *pattern*::
|
||||
This is like calling :func:`Path.glob` with "``**/``" added in front of the
|
||||
given relative *pattern*::
|
||||
|
||||
>>> sorted(Path().rglob("*.py"))
|
||||
[PosixPath('build/lib/pathlib.py'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue