diff options
| author | Guido van Rossum <guido@python.org> | 2006-08-22 00:21:25 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 2006-08-22 00:21:25 +0000 |
| commit | 89da5d7c3d9cf5bfd4a374e23fd924bbffdeaf5c (patch) | |
| tree | aef767c70a3b57c4128d44816e4e070d28fffb9d /Lib/difflib.py | |
| parent | 6cefeb0e8156406ac3f99248f6a3d3cd1536ca23 (diff) | |
| download | cpython-git-89da5d7c3d9cf5bfd4a374e23fd924bbffdeaf5c.tar.gz | |
Kill reduce(). A coproduction of John Reese, Jacques Frechet, and Alex M.
Diffstat (limited to 'Lib/difflib.py')
| -rw-r--r-- | Lib/difflib.py | 3 |
1 files changed, 1 insertions, 2 deletions
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): |
