This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: difflib empty list IndexError fix (Bug #980117)
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, roccomoretti
Priority: normal Keywords: patch

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:05adminsetgithub: 40462
2004-06-26 02:52:16roccomoretticreate