def get_differences (msg1, msg2):
    diffs = []

    for header in ['subject', 'from', 'to']:
        h1 = msg1[header]
        h2 = msg2[header]
        if not h1 or not h2 or h1 != h2:
            diffs.append ((repr(header) % "Header '%s' differs", h1, h2))

    body1 = msg1.message.get_payload()
    body2 = msg2.message.get_payload()
    if body1 != body2:
        diffs.append (("Bodies differ", body1, body2))

    return diffs
dataset/ETHPy150Open kdart/pycopia/core/pycopia/smtp_envelope.py/get_differences/swapped operands of `%`