(url)
return url, None
splittag('/path#tag') --> '/path', 'tag'.
splittag('/path#tag') --> '/path', 'tag'.
splittag ( / path#tag ) -- > / path tag .
def _splittag(url):
    """splittag('/path#tag') --> '/path', 'tag'."""
    path, delim, tag = url.rpartition('#')
    if delim:
        return path, tag
    return url, None
def _splittag ( url ) : path , delim , tag = url . rpartition ( '#' ) if delim : return path , tag return url , None