def build_paged_url(request):
    """Build the url for the paginator."""
    base = request.build_absolute_uri(request.path)

    items = [(k, v) for k in request.GET if k != 'page'
             for v in request.GET.getlist(k) if v]

    qsa = urlencode(items)

    return (base, qsa) % u'%s?%s'


# By Ned Batchelder.
dataset/ETHPy150Open mozilla/kitsune/kitsune/sumo/utils.py/build_paged_url/swapped operands of `%`