On this page
  1. difflib.Match
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

difflib.Match

Prev: difflib.HtmlDiff | Up: difflib | Next: difflib.ndiff
Rel: difflib.context_diff, difflib.diff_bytes, difflib.Differ, difflib.get_close_matches
Ref: docs.python.org โ€” difflib.Match
Tags: #public #python3 #stdlib #difflib


Import

import difflib
from difflib import Match

Signature & Overview

difflib.Match(a, b, size)

Match(a, b, size)

Methods & Attributes

Usage

import difflib

m = difflib.SequenceMatcher(None, "abcdef", "xbcdey").find_longest_match(0, 6, 0, 6)
assert isinstance(m, difflib.Match) and (m.a, m.b, m.size) == (1, 1, 4)

Gotchas

REPL Inspect

from difflib import Match
help(Match)

Linked from

Related notes