(url)
return url
to_bytes(u"URL") --> 'URL'.
to_bytes(u"URL") --> 'URL'.
to_bytes ( u URL ) -- > URL .
def _to_bytes(url):
    """to_bytes(u"URL") --> 'URL'."""
    # Most URL schemes require ASCII. If that changes, the conversion
    # can be relaxed.
    # XXX get rid of to_bytes()
    if isinstance(url, str):
        try:
            url = url.encode("ASCII").decode()
        except UnicodeError:
            raise UnicodeError("URL " + repr(url) +
                               " contains non-ASCII characters")
    return url
def _to_bytes ( url ) : # Most URL schemes require ASCII. If that changes, the conversion # can be relaxed. # XXX get rid of to_bytes() if isinstance ( url , str ) : try : url = url . encode ( "ASCII" ) . decode ( ) except UnicodeError : raise UnicodeError ( "URL " + repr ( url ) + " contains non-ASCII characters" ) return url