Message390119
First I need to apologize for not providing more info already when I created the issue.
Initially, I did not even plan to create an issue, and thought the PR with the context of the current documentation would be sufficient information.
Thanks for taking your time anyway!
Also, thanks to Tim for explaining the meaning of the question mark in detail. When I read the documentation, I also had to pause a moment to understand the sentence. But I agree with Tim, it is hard to explain it better without getting much more verbose.
My initial reason to read (and then to update) the documentation was an output of pytest, which left me puzzled.
E AssertionError: assert 'ROOT: No tox...ith_no_t0/p\n' == 'ROOT: No tox..._with_no_t0/p'
E Skipping 136 identical leading characters in diff, use -v to show
E - ith_no_t0/p
E + ith_no_t0/p
E ? +
Here is the screenshot and some discussion:
https://twitter.com/jugmac00/status/1377317886419738624
Using a similar snippet as Tim, here is a minimal example:
for L in d.compare(["abcdefghijkl"], ["abcdefghijkl\n"]):
print(L)
- abcdefghijkl
+ abcdefghijkl
? +
Usually, the output is pretty obvious most of the time, so I never actually noticed the question mark - except when whitespace characters are involved.
I was then told that pytest uses difflib, and I was kindly pointed to the Python documentation.
As only the tab character was listed, I thought it would be a good idea to add the other whitespace characters as well.
After Tim's explanation, I see, that tabs could be especially confusing, while all whitespace characters are on a normal level of confusing :-), especially at the end of the diff.
I certainly won't forget what I learned, but maybe my proposal helps one fellow Python user or another. |
|
Date |
User |
Action |
Args |
2021-04-03 08:27:22 | jugmac00 | set | recipients:
+ jugmac00, tim.peters, terry.reedy, docs@python |
2021-04-03 08:27:22 | jugmac00 | set | messageid: <1617438442.25.0.0577525015606.issue43689@roundup.psfhosted.org> |
2021-04-03 08:27:22 | jugmac00 | link | issue43689 messages |
2021-04-03 08:27:21 | jugmac00 | create | |
|