Skip to content

Commit 143147d

Browse files
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 c12375a) Co-authored-by: Tim Lo <[email protected]>
1 parent 0abb548 commit 143147d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/pathlib.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,8 +515,10 @@ Pure paths provide the following methods and properties:
515515
>>> PurePath('a/b.py').match('/*.py')
516516
False
517517

518-
As with other methods, case-sensitivity is observed::
518+
As with other methods, case-sensitivity follows platform defaults::
519519

520+
>>> PurePosixPath('b.py').match('*.PY')
521+
False
520522
>>> PureWindowsPath('b.py').match('*.PY')
521523
True
522524

0 commit comments

Comments
 (0)