def _url_quote(string, encoding):
    if encoding:
        if isinstance(string, six.text_type):
            s = string.encode(encoding)
        elif isinstance(string, six.text_type):
            # assume the encoding is already correct
            s = string
        else:
            s = six.text_type(string).encode(encoding)
    else:
        s = str(string)
    return urllib.parse.quote(s, '/')
return pkg doc url for the selected obj in src
dataset/ETHPy150Open bbangert/routes/routes/util.py/_url_quote--crossover with--dataset/ETHPy150Open jtdeng/GoToDoc/GoToDoc.py/get_pkg_doc_url