diff options
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 7ab682d..408079b 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): |