Python stdlib module — difflib. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.IS_CHARACTER_JUNK()NeutralIS_CHARACTER_JUNK(ch, ws)
Return True for ignorable character: iff `ch` is a space or tab.
.IS_LINE_JUNK()NeutralIS_LINE_JUNK(line, pat)
Return True for ignorable line: iff `line` is blank or contains a single '#'.
.context_diff()Neutralcontext_diff(a, b, fromfile, tofile, fromfiledate, tofiledate, n, lineterm)
Compare two sequences of lines; generate the delta as a context diff.
.diff_bytes()Neutraldiff_bytes(dfunc, a, b, fromfile, tofile, fromfiledate, tofiledate, n, lineterm)
Compare `a` and `b`, two sequences of lines represented as bytes rather
.get_close_matches()Neutralget_close_matches(word, possibilities, n, cutoff)
Use SequenceMatcher to return list of the best "good enough" matches.
.ndiff()Neutralndiff(a, b, linejunk, charjunk)
Compare `a` and `b` (lists of strings); return a `Differ`-style delta.
.restore()Neutralrestore(delta, which)
Generate one of the two sequences that generated a delta.
.unified_diff()Neutralunified_diff(a, b, fromfile, tofile, fromfiledate, tofiledate, n, lineterm)
Compare two sequences of lines; generate the delta as a unified diff.
.Differ()NeutralDiffer(...)
Differ is a class for comparing sequences of lines of text, and
| FQN | Field | |
|---|---|---|
| difflib | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
import difflib