mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
Correct Glossary key function example to use str.casefold instead of str.lower (#140316)
This commit is contained in:
parent
2450be607c
commit
190aa9fe7e
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue