summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMariatta <Mariatta@users.noreply.github.com>2017-06-10 14:25:33 (GMT)
committerGitHub <noreply@github.com>2017-06-10 14:25:33 (GMT)
commit76eabd3a21dc578de6093d45dd8d69a5ec4b9afe (patch)
treec1beddea177db5390ac8368da97bacbbf1d65184
parent6e14fd2a14cef6ea0709ad234ab41198c2195591 (diff)
downloadcpython-76eabd3a21dc578de6093d45dd8d69a5ec4b9afe.zip
cpython-76eabd3a21dc578de6093d45dd8d69a5ec4b9afe.tar.gz
cpython-76eabd3a21dc578de6093d45dd8d69a5ec4b9afe.tar.bz2
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 e5f6e86c48c7b2eb9e1d6a0e72867b4d8b4720f3)
-rw-r--r--Doc/library/fnmatch.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst
index c03a9d3..634c26e 100644
--- a/Doc/library/fnmatch.rst
+++ b/Doc/library/fnmatch.rst
@@ -43,9 +43,8 @@ patterns.
.. function:: fnmatch(filename, pattern)
Test whether the *filename* string matches the *pattern* string, returning
- :const:`True` or :const:`False`. If the operating system is case-insensitive,
- then both parameters will be normalized to all lower- or upper-case before
- the comparison is performed. :func:`fnmatchcase` can be used to perform a
+ :const:`True` or :const:`False`. Both parameters are case-normalized
+ using :func:`os.path.normcase`. :func:`fnmatchcase` can be used to perform a
case-sensitive comparison, regardless of whether that's standard for the
operating system.
@@ -63,7 +62,8 @@ patterns.
.. function:: fnmatchcase(filename, pattern)
Test whether *filename* matches *pattern*, returning :const:`True` or
- :const:`False`; the comparison is case-sensitive.
+ :const:`False`; the comparison is case-sensitive and does not apply
+ :func:`os.path.normcase`.
.. function:: filter(names, pattern)