From a6afa49318533390062035e19b790d54d89531d0 Mon Sep 17 00:00:00 2001 From: "Jordan M. Adler" Date: Mon, 10 Sep 2018 12:05:10 -0700 Subject: [PATCH] Revert "remove the parens from the cmp() lambda definition" --- docs/compatible_idioms.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/compatible_idioms.rst b/docs/compatible_idioms.rst index 7eb0cfb6..e48ac6d1 100644 --- a/docs/compatible_idioms.rst +++ b/docs/compatible_idioms.rst @@ -1120,7 +1120,7 @@ cmp() .. code:: python # Python 2 and 3: alternative 2 - cmp = lambda x, y: (x > y) - (x < y) + cmp = lambda(x, y): (x > y) - (x < y) assert cmp('a', 'b') < 0 and cmp('b', 'a') > 0 and cmp('c', 'c') == 0 reload() ~~~~~~~~