New submission from Karthikeyan Singaravelan <tir.kar...@gmail.com>:

https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.match

Under PurePath.match there is a statement that case-sensitivity is followed but 
presents an example in Windows where case insensitive match returns True. This 
is confusing since match internally uses fnmatch.fnmatchcase that doesn't 
normalize case but in Windows files are case insensitive. Either the doc could 
be clarified that it's platform dependent or present a PosixPath example or 
present two examples with one for Linux and one for Windows that it's platform 
dependent.

As with other methods, case-sensitivity is observed:

>>> PureWindowsPath('b.py').match('*.PY')
True

----------
assignee: docs@python
components: Documentation
messages: 359717
nosy: docs@python, pitrou, serhiy.storchaka, xtreak
priority: normal
severity: normal
status: open
title: PurePath.match indicates case-sensitive nature and presents a 
case-insensitive example
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39285>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to