(url)
return url, None
splitquery('/path?query') --> '/path', 'query'.
splitquery('/path?query') --> '/path', 'query'.
splitquery ( / path?query ) -- > / path query .
def _splitquery(url):
    """splitquery('/path?query') --> '/path', 'query'."""
    path, delim, query = url.rpartition('?')
    if delim:
        return path, query
    return url, None
def _splitquery ( url ) : path , delim , query = url . rpartition ( '?' ) if delim : return path , query return url , None