def get_hunks(fromlines, tolines, context=None):
    matcher = difflib.SequenceMatcher(None, fromlines, tolines)
    if context is None:
        return (hunk for hunk in [matcher.get_opcodes()])
    else:
        return matcher.get_grouped_opcodes(context)
Generator yielding grouped opcodes describing differences .
dataset/ETHPy150Open edgewall/trac/trac/versioncontrol/diff.py/get_hunks