summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Lo <timlo@users.noreply.github.com>2020-04-19 09:43:11 (GMT)
committerGitHub <noreply@github.com>2020-04-19 09:43:11 (GMT)
commitc12375aa0b838d34067efa3f1b9a1fbc632d0413 (patch)
tree68a82cf4d5a2ba34f64f643620fcbc19814fed3d
parent4fe002045fcf40823154b709fef0948b2bc5e934 (diff)
downloadcpython-c12375aa0b838d34067efa3f1b9a1fbc632d0413.zip
cpython-c12375aa0b838d34067efa3f1b9a1fbc632d0413.tar.gz
cpython-c12375aa0b838d34067efa3f1b9a1fbc632d0413.tar.bz2
bpo-39285: Clarify example for PurePath.match (GH-19458)
Fixes Issue39285 The example incorrectly returned True for match. Furthermore the example is ambiguous in its usage of PureWindowsPath. Windows is case-insensitve, however the underlying match functionality utilizes fnmatch.fnmatchcase. Automerge-Triggered-By: @pitrou
-rw-r--r--Doc/library/pathlib.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index 004c156..d4329e7 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -528,8 +528,10 @@ Pure paths provide the following methods and properties:
>>> PurePath('a/b.py').match('/*.py')
False
- As with other methods, case-sensitivity is observed::
+ As with other methods, case-sensitivity follows platform defaults::
+ >>> PurePosixPath('b.py').match('*.PY')
+ False
>>> PureWindowsPath('b.py').match('*.PY')
True