Message335158
Sorry to comment on a closed issue. I see the following behavior with difflib.ndiff which is used under the hood by unittest. The strings that differ by '-' and 'w' generate different output compared to 'a' and 'w'. I find the output for diff using '-' and 'w' little confusing and is this caused due to '-' which is also used as a marker in difflib?
$ ./python.exe
Python 3.8.0a1+ (heads/master:8a03ff2ff4, Feb 9 2019, 10:42:29)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import difflib
>>> print(''.join(difflib.ndiff(["drwxrwxr-x 2 2000 2000\n"], ["drwxr-xr-x 2 2000 2000\n"])))
- drwxrwxr-x 2 2000 2000
? ---
+ drwxr-xr-x 2 2000 2000
? +++
>>> print(''.join(difflib.ndiff(["drwxrwxr-x 2 2000 2000\n"], ["drwxraxr-x 2 2000 2000\n"])))
- drwxrwxr-x 2 2000 2000
? ^
+ drwxraxr-x 2 2000 2000
? ^ |
|
Date |
User |
Action |
Args |
2019-02-10 14:58:28 | xtreak | set | recipients:
+ xtreak, jaraco |
2019-02-10 14:58:27 | xtreak | set | messageid: <1549810707.0.0.386818298203.issue35955@roundup.psfhosted.org> |
2019-02-10 14:58:26 | xtreak | link | issue35955 messages |
2019-02-10 14:58:26 | xtreak | create | |
|