This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients jaraco, xtreak
Date 2019-02-10.14:58:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1549810707.0.0.386818298203.issue35955@roundup.psfhosted.org>
In-reply-to
Content
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
?      ^
History
Date User Action Args
2019-02-10 14:58:28xtreaksetrecipients: + xtreak, jaraco
2019-02-10 14:58:27xtreaksetmessageid: <1549810707.0.0.386818298203.issue35955@roundup.psfhosted.org>
2019-02-10 14:58:26xtreaklinkissue35955 messages
2019-02-10 14:58:26xtreakcreate