N
Neilen Marais
Hi
I'm trying to compare some text to find differences other than whitespace.
I seem to be misunderstanding something, since I can't even get a basic
example to work:
In [104]: d = difflib.Differ(charjunk=difflib.IS_CHARACTER_JUNK)
In [105]: list(d.compare([' a'], ['a']))
Out[105]: ['- a', '+ a']
Surely if whitespace characters are being ignored those two strings should
be marked as identical? What am I doing wrong?
Thanks
Neilen
I'm trying to compare some text to find differences other than whitespace.
I seem to be misunderstanding something, since I can't even get a basic
example to work:
In [104]: d = difflib.Differ(charjunk=difflib.IS_CHARACTER_JUNK)
In [105]: list(d.compare([' a'], ['a']))
Out[105]: ['- a', '+ a']
Surely if whitespace characters are being ignored those two strings should
be marked as identical? What am I doing wrong?
Thanks
Neilen