From f83076f722d66ebc27d66bc13798d4e5bc9cc27a Mon Sep 17 00:00:00 2001 From: cgohlke Date: Mon, 10 Oct 2011 13:19:46 -0700 Subject: [PATCH] Fix `TypeError: must use keyword argument for key function` on Python 3 --- scikits/image/transform/tests/test_hough_transform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scikits/image/transform/tests/test_hough_transform.py b/scikits/image/transform/tests/test_hough_transform.py index 175c1b37..13593150 100644 --- a/scikits/image/transform/tests/test_hough_transform.py +++ b/scikits/image/transform/tests/test_hough_transform.py @@ -61,7 +61,7 @@ def test_probabilistic_hough(): sorted_lines = [] for line in lines: line = list(line) - line.sort(lambda x,y: cmp(x[0], y[0])) + line.sort(key=lambda x: x[0]) sorted_lines.append(line) assert([(25, 75), (74, 26)] in sorted_lines) assert([(25, 25), (74, 74)] in sorted_lines)