mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00: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
|
@ -1090,7 +1090,7 @@ class Path(PurePath):
|
|||
|
||||
def glob(self, pattern):
|
||||
"""Iterate over this subtree and yield all existing files (of any
|
||||
kind, including directories) matching the given pattern.
|
||||
kind, including directories) matching the given relative pattern.
|
||||
"""
|
||||
if not pattern:
|
||||
raise ValueError("Unacceptable pattern: {!r}".format(pattern))
|
||||
|
@ -1104,7 +1104,8 @@ class Path(PurePath):
|
|||
|
||||
def rglob(self, pattern):
|
||||
"""Recursively yield all existing files (of any kind, including
|
||||
directories) matching the given pattern, anywhere in this subtree.
|
||||
directories) matching the given relative pattern, anywhere in
|
||||
this subtree.
|
||||
"""
|
||||
pattern = self._flavour.casefold(pattern)
|
||||
drv, root, pattern_parts = self._flavour.parse_parts((pattern,))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue