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
This commit is contained in:
Tim Lo 2020-04-19 05:43:11 -04:00 committed by GitHub
parent 4fe002045f
commit c12375aa0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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