Tim Peters <[email protected]> added the comment:
Lines beginning with "?" are entirely synthetic: they were not present in
either input. So that's what that part means.
I'm not clear on what else could be materially clearer without greatly bloating
the text. For example,
>>> d = difflib.Differ()
>>> for L in d.compare(["abcefghijkl\n"], ["a cxefghijkl\n"]):
print(L, end="")
- abcefghijkl
? ^
+ a cxefghijkl
? ^ +
The "?" lines guide the eye to the places that differ: "b" was replaced by a
blank, and "x" was inserted. The marks on the "?" lines are intended to point
out exactly where changes (substitutions, insertions, deletions) occurred.
If the second input had a tab instead of a blank, the "+" wouldn't _appear_ to
be under the "x" at all. It would instead "look like" a long string of blanks
was between "a" and "c" in the first input, and the "+" would appear to be
under one of them somewhere near the middle of the empty space.
Tough luck. Use tab characters (or any other kind of "goofy" whitespace) in
input to visual tools, and you deserve whatever you get :-)
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43689>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com