From 04a774d26c90562990015f0bf7c1240dd041c704 Mon Sep 17 00:00:00 2001 From: partev Date: Sun, 30 Oct 2022 21:38:03 -0400 Subject: [PATCH] DOC: fix a typo there is a missing close parenthesis. I also added the comment available here: https://docs.python.org/3.12/library/functools.html#functools.cmp_to_key from where this example was probably copied --- Doc/howto/sorting.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/howto/sorting.rst b/Doc/howto/sorting.rst index 588e895b04bde2..decce12bf3faf6 100644 --- a/Doc/howto/sorting.rst +++ b/Doc/howto/sorting.rst @@ -247,7 +247,7 @@ To accommodate those situations, Python provides :class:`functools.cmp_to_key` to wrap the comparison function to make it usable as a key function:: - sorted(words, key=cmp_to_key(strcoll) + sorted(words, key=cmp_to_key(strcoll)) # locale-aware sort order Odds and Ends =============