def table_row(k, v, html):
    """Output a key-value pair as a row in a table."""
    if html:
        return ''.join(['<tr><td class="e">', k, '</td><td class="v">', v, '</td></tr>'])
    else:
        return k + '\n' + v + '\n\n'