def _split_translation(translation):
    """
    Process the *translation* string, which is a sequence of assignments.

    Blanks and comments (c-style and python-style) are stripped.

    Conditional expressions should use C syntax (! || && ? :) not python.
    """
    assignments = []
    for line in translation.split('\n'):
        code = line.split('#', 1)[0].split('//', 1)[0].strip()
        if not code:
            continue
        parts = code.split('=', 1)
        if len(parts) == 1:
            raise ValueError("translation expected 'var=expr' but got %r", line
                )
        var, expr = parts
        assignments.append((var.strip(), expr.strip()))
    return assignments
