Berker Peksag added the comment: Some small comments:
* diff_bytes needs to be documented in the difflib docs and in Doc/whatsnew/3.5.rst. * diff_bytes needs to be added to difflib.__all__ * This looks like a new feature to me, so it would be better to just commit it to the default branch. + except AttributeError: + raise TypeError('all arguments must be bytes, not %r' % s) This could be changed to raise TypeError(...) from None + self.assertTrue( + isinstance(line, bytes), assertIsInstance + try: + list(difflib.unified_diff(a, b, fna, fnb)) + self.fail('expected TypeError') + except TypeError: + pass with self.assertRaises(TypeError): list(difflib.unified_diff(a, b, fna, fnb)) looks more readable to me. ---------- nosy: +berker.peksag _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17445> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com