commit | 89da5d7c3d9cf5bfd4a374e23fd924bbffdeaf5c | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Aug 22 00:21:25 2006 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Aug 22 00:21:25 2006 +0000 |
tree | aef767c70a3b57c4128d44816e4e070d28fffb9d | |
parent | 6cefeb0e8156406ac3f99248f6a3d3cd1536ca23 [diff] [blame] |
Kill reduce(). A coproduction of John Reese, Jacques Frechet, and Alex M.
diff --git a/Lib/difflib.py b/Lib/difflib.py index 7ab682d..408079b 100644 --- a/Lib/difflib.py +++ b/Lib/difflib.py
@@ -652,8 +652,7 @@ 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):