From 89da5d7c3d9cf5bfd4a374e23fd924bbffdeaf5c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 22 Aug 2006 00:21:25 +0000 Subject: Kill reduce(). A coproduction of John Reese, Jacques Frechet, and Alex M. --- Lib/difflib.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Lib/difflib.py') diff --git a/Lib/difflib.py b/Lib/difflib.py index 7ab682dee7..408079b803 100644 --- a/Lib/difflib.py +++ b/Lib/difflib.py @@ -652,8 +652,7 @@ class SequenceMatcher: 1.0 """ - matches = reduce(lambda sum, triple: sum + triple[-1], - self.get_matching_blocks(), 0) + matches = sum(triple[-1] for triple in self.get_matching_blocks()) return _calculate_ratio(matches, len(self.a) + len(self.b)) def quick_ratio(self): -- cgit v1.2.1