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: Refactoring of difflib.Differ
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: tim.peters Nosy List: cmalamas, nnorwitz, tim.peters
Priority: normal Keywords: patch

Created on 2002-08-27 20:54 by cmalamas, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch cmalamas, 2002-08-27 20:54 Patch of difflib from the 2.1.x branch
Messages (3)
msg41040 - (view) Author: Costas Malamas (cmalamas) Date: 2002-08-27 20:54
The difflib.Differ class currently only acts as a helper for 
ndiff, creating human-readable diffs that mimic the Unix 
diff.  This patch refactors Differ into two layers: 
BaseDiffer and Differ.  

BaseDiffer contains the workhorse algorithms of the 
current Differ without format-specific code.  Instead, it 
adds event handlers that are triggered as the diff is 
calculated.  Thus the Differ engine can now be used to 
produce diff reports in other formats (like HTML or XML) 
or to add programmatic behavior --for example to extract 
only inserted XML from an XML feed for faster parsing.

Differ implements the BaseDiffer API to produce a 
backwards-compatible diff, just like ndiff.
msg41041 - (view) Author: Costas Malamas (cmalamas) Date: 2002-08-27 20:59
Logged In: YES 
user_id=71233

Forgot to say that this is a 2.1 patch only as I cannot test 2.2 
yet.  Assigned to Tim, since it's 95% his code.
msg41042 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-04-12 01:30
Logged In: YES 
user_id=33168

Costas, since this patch would only be applied against 2.3,
the current patch is not useful.  If you are interested in
forward porting the patch to current code, we can consider
it then.  Thanks.
History
Date User Action Args
2022-04-10 16:05:37adminsetgithub: 37095
2002-08-27 20:54:29cmalamascreate