Open mpenning opened 9 years ago
Hi,
Difflib2 is mostly a playground, I haven't especially worked on it in a while, mostly for lack of time. IIRC, I should have an IPython notebook lying around that try to replicate the Sequece matcher API. I'll try to find it. But I'm not sure I went so far as to do get_opcodes()
Hi,
I have a library which uses
SequenceMatcher.get_opcodes()
to identify a set of diffs between lists of text objects.I'm interested in testing difflib2; however, I'm curious whether there is a way to mimic the behavior of
SequenceMatcher.get_opcodes()
so I could drop it into my library and leverage the existing test suite? If you'd like to see how I'm using difflib, check outciscoconfparse.py
. Right now, I build a heirarchy of parent objects and root each diff from the parent object, since it tends to get better results from difflib.Thoughts?