Skip to content

Commit 44848a7

Browse files
authored
Merge pull request #298 from cclauss/patch-1
remove the parens from the cmp() lambda definition
2 parents a58117c + 1cf58c3 commit 44848a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/compatible_idioms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ cmp()
11201120
.. code:: python
11211121
11221122
# Python 2 and 3: alternative 2
1123-
cmp = lambda(x, y): (x > y) - (x < y)
1123+
cmp = lambda x, y: (x > y) - (x < y)
11241124
assert cmp('a', 'b') < 0 and cmp('b', 'a') > 0 and cmp('c', 'c') == 0
11251125
reload()
11261126
~~~~~~~~

0 commit comments

Comments
 (0)