Skip to content

Commit 9660a7e

Browse files
authored
bpo-25409: Clarify fnmatch and fnmatchcase documentation (GH-1535) (GH-2067)
Mention that fnmatchcase does not call normcase, and fnmatch does. (cherry picked from commit e5f6e86)
1 parent 28288be commit 9660a7e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/fnmatch.rst

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

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

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

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

6969

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

0 commit comments

Comments
 (0)