[Python-checkins] python/dist/src/Lib difflib.py,1.20,1.21
bcannon at users.sourceforge.net
bcannon at users.sourceforge.net
Sun Jul 11 01:54:09 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26258/Lib
Modified Files:
difflib.py
Log Message:
SequenceMatcher(None, [], []).get_grouped_opcodes() now returns a generator
that behaves as if both lists has an empty string in each of them.
Closes bug #979794 (and duplicate bug #980117).
Index: difflib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/difflib.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** difflib.py 15 Jun 2004 23:53:34 -0000 1.20
--- difflib.py 10 Jul 2004 23:54:07 -0000 1.21
***************
*** 573,576 ****
--- 573,578 ----
codes = self.get_opcodes()
+ if not codes:
+ codes = [("equal", 0, 1, 0, 1)]
# Fixup leading and trailing groups if they show no changes.
if codes[0][0] == 'equal':
More information about the Python-checkins
mailing list