def _self_link(request, **kwargs):
    new_kwargs = request.GET.copy()

    # build a new querydict using the GET params from the current
    # request, with those passed to this function overridden. we can't
    # use QueryDict.update here, since it APPENDS, rather than REPLACES.
    for k, v in kwargs.items():
        new_kwargs[k] = v

    kwargs_enc = new_kwargs.urlencode()
    return (request.path, kwargs_enc) % "%s?%s"
dataset/ETHPy150Open rapidsms/rapidsms/rapidsms/templatetags/paginator_tags.py/_self_link/swapped operands of `%`