Handle the query as a WWW HTTP 1630 query, as this is how people
    usually thinks of URI queries in general.  We do not decode anything
    in split operations, neither percent nor the terrible plus-to-space
    conversion.  Return:

    >>> split_query("k1=v1&k2=v+2%12&k3=&k4&&&k5==&=k&==")
    (('k1', 'v1'), ('k2', 'v+2%12'), ('k3', ''), ('k4', None), ('k5', '='), ('', 'k'), ('', '='))

def split_query(query):
    """
    Handle the query as a WWW HTTP 1630 query, as this is how people
    usually thinks of URI queries in general.  We do not decode anything
    in split operations, neither percent nor the terrible plus-to-space
    conversion.  Return:

    >>> split_query("k1=v1&k2=v+2%12&k3=&k4&&&k5==&=k&==")
    (('k1', 'v1'), ('k2', 'v+2%12'), ('k3', ''), ('k4', None), ('k5', '='), ('', 'k'), ('', '='))
    """
    def split_assignment(a):
        sa = a.split('=', 1)
        return len(sa) == 2 and tuple(sa) or (sa[0], None)
    assignments = query.split('&')
    return tuple([split_assignment(a) for a in assignments if a])