def with_qs(url, **args):
    """Updates query string part from the ``url``.  Parameters to update
    are given by keywords.

    """
    try:
        pos = url.index('?')
    except __HOLE__:
        return url + '?' + url_encode(args)
    pos += 1
    query = url_decode(url[pos:], cls=dict)
    query.update(args)
    return url[:pos] + url_encode(query)
dataset/ETHPy150Open crosspop/asuka/asuka/web.py/with_qs