Issue 980120: difflib empty list IndexError fix (Bug #980117) (original) (raw)

Issue980120

Created on 2004-06-26 02:52 by roccomoretti, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
difflib patch.txt roccomoretti,2004-06-26 02:52 Patch for Bug 980117
Messages (2)
msg46241 - (view) Author: Rocco Moretti (roccomoretti) Date: 2004-06-26 02:52
This is a potential fix for the Bug #980117. The functions unified_diff() and context_diff() give an IndexError when called with two empty lists due to an unmasked index of the opcode lists in SequenceMatcher.get_grouped_opcodes(). In the case of two empty lists passed to the functions, SequenceMatcher.codes is an empty list.
msg46242 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-07-10 23:59
Logged In: YES user_id=357491 Fixed in rev. 1.21 of Lib/difflib.py .
History
Date User Action Args
2022-04-11 14:56:05 admin set github: 40462
2004-06-26 02:52:16 roccomoretti create