I found that using _mdiff()
indifflib
to be useful when I have to crate a HTML table different to what make_table()
generates.
Any reasons not to make that a standard method?
I suggest filing a feature request for it to be promoted to a public API. Inertia of the existing code remaining as it is (it is stable and doesn’t change often) is likely the main reason it hasn’t.
I guess one reason is that its output isn’t a very good public API.
Generally, having to re-parse serialized output (from ndiff) suggests that either we have inadequate/missing lower-level API (that would deal with iterators of (named)tuples/dataclasses, rather than embedded \n+
or \0+
markers), or that the function predates that API.
But, we already have _mdiff
, and I don’t think anyone’s eager to add a new differ whose output wouldn’t require parsing. Documenting _mdiff
’s output and exposing it might be the most pragmatic thing to do.