

def extension(url):
    'Return the file extension, given (typically) a URL.'
    if url:
        path = urlparse.urlparse(url).path
        ext = os.path.splitext(path)[1]
        return ext
    else:
        return None

dataset/ETHPy150Open miklevin/pipulate/common.py extension/original