From: Cameron Beck <94604154+cbkinase@users.noreply.github.com> Date: Tue, 16 Dec 2025 11:44:12 +0000 (-0500) Subject: Correct Glossary key function example to use str.casefold instead of str.lower (... X-Git-Tag: v3.15.0a3~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=190aa9fe7ecfba1ae385e7d0f3bb52999f6051ff;p=thirdparty%2FPython%2Fcpython.git Correct Glossary key function example to use str.casefold instead of str.lower (#140316) --- diff --git a/Doc/glossary.rst b/Doc/glossary.rst index a4066d42927f..3a01df99c38c 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -813,7 +813,7 @@ Glossary :func:`itertools.groupby`. There are several ways to create a key function. For example. the - :meth:`str.lower` method can serve as a key function for case insensitive + :meth:`str.casefold` method can serve as a key function for case insensitive sorts. Alternatively, a key function can be built from a :keyword:`lambda` expression such as ``lambda r: (r[0], r[2])``. Also, :func:`operator.attrgetter`, :func:`operator.itemgetter`, and