def url_for_other_page(remove_args=[], **kwargs):
    args = request.args.copy()
    remove_args = ['_pjax']
    for key in remove_args:
        if args.keys() in key:
            args.pop(key)
    new_args = [x for x in kwargs.iteritems()]
    for key, value in new_args:
        args[key] = value
    return url_for(request.endpoint, **args)
dataset/ETHPy150Open cburmeister/flask-bones/app/utils.py/url_for_other_page/swapped operands of `in`