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.
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.