Expand description
The part of Python’s difflib (CPython 3.13) that fontTools.diff uses:
SequenceMatcher without a junk function, with its “popular elements”
heuristic (autojunk), and unified_diff.
Structs§
- Match
- A matching block:
a[a..a + size] == b[b..b + size](Match). - Sequence
Matcher SequenceMatcher(None, a, b, autojunk): finds the longest matching blocks of two sequences, recursively.
Enums§
- Tag
- An operation turning a range of
ainto a range ofb(get_opcodes).
Functions§
- unified_
diff unified_diff(a, b, fromfile, tofile, fromfiledate, tofiledate, n, lineterm): the lines of the unified diff of two sequences of lines, withnlines of context.
Type Aliases§
- Opcode
- An opcode: the tag and the ranges
(i1, i2, j1, j2). The ranges are signed: with a negative number of context lines,get_grouped_opcodesmakes ranges that Python slices as it does negative indices.