PyDocs

Nav

Text Processing Services

diff_bytes

difflib

function · Added in 3.5 (source)
  • diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'', fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\n')
Compare `a` and `b`, two sequences of lines represented as bytes rather
than str. This is a wrapper for `dfunc`, which is typically either
unified_diff() or context_diff(). Inputs are losslessly converted to
strings so that `dfunc` only has to worry about strings, and encoded
back to bytes on return. This is necessary to compare files with
unknown or inconsistent encoding. All other inputs (except `n`) must be
bytes rather than str.
0 Examples
No examples for difflib/diff_bytes.
See Also
No see-alsos for difflib/diff_bytes
0 Notes
No notes for diff_bytes