Skip to content

Commit c12375a

Browse files
authored
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
1 parent 4fe0020 commit c12375a

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
@@ -528,8 +528,10 @@ Pure paths provide the following methods and properties:
528528
>>> PurePath('a/b.py').match('/*.py')
529529
False
530530

531-
As with other methods, case-sensitivity is observed::
531+
As with other methods, case-sensitivity follows platform defaults::
532532

533+
>>> PurePosixPath('b.py').match('*.PY')
534+
False
533535
>>> PureWindowsPath('b.py').match('*.PY')
534536
True
535537

0 commit comments

Comments
 (0)