summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-04-19 10:03:35 (GMT)
committerGitHub <noreply@github.com>2020-04-19 10:03:35 (GMT)
commit8c0734397603d84e3a2e753463b44cf904147cc4 (patch)
tree5be3da80a4e67df7c08b1be2f9348f64446cf8d9 /Doc/library
parent020f2aaaea95aef6f54ab31488926ed76017e41a (diff)
downloadcpython-8c0734397603d84e3a2e753463b44cf904147cc4.zip
cpython-8c0734397603d84e3a2e753463b44cf904147cc4.tar.gz
cpython-8c0734397603d84e3a2e753463b44cf904147cc4.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 (cherry picked from commit c12375aa0b838d34067efa3f1b9a1fbc632d0413) Co-authored-by: Tim Lo <timlo@users.noreply.github.com>
Diffstat (limited to 'Doc/library')
-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 0340814..b900d09 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -515,8 +515,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