[3.7] bpo-22062: Updated docstring and documentation for pathlib (GH-8519) (GH-11817)
Original patch by Mike Short
https://bugs.python.org/issue22062
(cherry picked from commit 537b6caa565ec2fc304ba6f4400cd347ce2af64b)
Co-authored-by: Eivind Teig <eivind.teig@gmail.com>
https://bugs.python.org/issue22062
diff --git a/Lib/pathlib.py b/Lib/pathlib.py
index 067edf1..dd6a83f 100644
--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -1090,7 +1090,7 @@
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 @@
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,))