[issue38789] difflib lacks a way to check if results are empty
Simon Friedberger
report at bugs.python.org
Mon Nov 18 03:30:12 EST 2019
Simon Friedberger <simon.nov2019 at a-oben.org> added the comment:
Hi Tim!
Sorry, if my explanation wasn't clear.
For some of the iterators - like the one produced by ndiff - the iterator will always return data, even if there is no difference in the files.
My current solution is to run difflib.unified_diff and check if the iterator is non-empty and then run difflib.ndiff again to get the output that I want.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38789>
_______________________________________
More information about the Python-bugs-list
mailing list