Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 76eabd3

Browse files
authored
bpo-25409: Clarify fnmatch and fnmatchcase documentation (GH-1535) (GH-2065)
Mention that fnmatchcase does not call normcase, and fnmatch does. (cherry picked from commit e5f6e86)
1 parent 6e14fd2 commit 76eabd3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/library/fnmatch.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ patterns.
4343
.. function:: fnmatch(filename, pattern)
4444

4545
Test whether the *filename* string matches the *pattern* string, returning
46-
:const:`True` or :const:`False`. If the operating system is case-insensitive,
47-
then both parameters will be normalized to all lower- or upper-case before
48-
the comparison is performed. :func:`fnmatchcase` can be used to perform a
46+
:const:`True` or :const:`False`. Both parameters are case-normalized
47+
using :func:`os.path.normcase`. :func:`fnmatchcase` can be used to perform a
4948
case-sensitive comparison, regardless of whether that's standard for the
5049
operating system.
5150

@@ -63,7 +62,8 @@ patterns.
6362
.. function:: fnmatchcase(filename, pattern)
6463

6564
Test whether *filename* matches *pattern*, returning :const:`True` or
66-
:const:`False`; the comparison is case-sensitive.
65+
:const:`False`; the comparison is case-sensitive and does not apply
66+
:func:`os.path.normcase`.
6767

6868

6969
.. function:: filter(names, pattern)

0 commit comments

Comments
 (0)