Commit 472f7008 authored by cclauss's avatar cclauss Committed by Jie Luo

remove the parens from the cmp() lambda definition (#3526)

* remove the parens from the cmp() lambda definition

https://github.com/PythonCharmers/python-future/pull/298

* remove the parens from the cmp() lambda definition

https://github.com/PythonCharmers/python-future/pull/298
parent 1825d6d8
...@@ -58,7 +58,7 @@ from google.protobuf import message ...@@ -58,7 +58,7 @@ from google.protobuf import message
try: try:
cmp # Python 2 cmp # Python 2
except NameError: except NameError:
cmp = lambda(x, y): (x > y) - (x < y) # Python 3 cmp = lambda x, y: (x > y) - (x < y) # Python 3
# Python pre-2.6 does not have isinf() or isnan() functions, so we have # Python pre-2.6 does not have isinf() or isnan() functions, so we have
# to provide our own. # to provide our own.
......
...@@ -59,7 +59,7 @@ except ImportError: ...@@ -59,7 +59,7 @@ except ImportError:
try: try:
cmp # Python 2 cmp # Python 2
except NameError: except NameError:
cmp = lambda(x, y): (x > y) - (x < y) # Python 3 cmp = lambda x, y: (x > y) - (x < y) # Python 3
from google.protobuf import map_unittest_pb2 from google.protobuf import map_unittest_pb2
from google.protobuf import unittest_pb2 from google.protobuf import unittest_pb2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment