(self)
return url
Convert self into a url

        This function should more or less round-trip with :func:`.parse_url`. The
        returned url may not be exactly the same as the url inputted to
        :func:`.parse_url`, but it should be equivalent by the RFC (e.g., urls
        with a blank port will have : removed).

        Example: ::

            >>> U = parse_url('http://google.com/mail/')
            >>> U.url
            'http://google.com/mail/'
            >>> Url('http', 'username:password', 'host.com', 80,
            ... '/path', 'query', 'fragment').url
            'http://username:password@host.com:80/path?query#fragment'
Convert self into a url
Convert self into a url
def url(self):
        """
        Convert self into a url

        This function should more or less round-trip with :func:`.parse_url`. The
        returned url may not be exactly the same as the url inputted to
        :func:`.parse_url`, but it should be equivalent by the RFC (e.g., urls
        with a blank port will have : removed).

        Example: ::

            >>> U = parse_url('http://google.com/mail/')
            >>> U.url
            'http://google.com/mail/'
            >>> Url('http', 'username:password', 'host.com', 80,
            ... '/path', 'query', 'fragment').url
            'http://username:password@host.com:80/path?query#fragment'
        """
        scheme, auth, host, port, path, query, fragment = self
        url = u''

        # We use "is not None" we want things to happen with empty strings (or 0 port)
        if scheme is not None:
            url += scheme + u'://'
        if auth is not None:
            url += auth + u'@'
        if host is not None:
            url += host
        if port is not None:
            url += u':' + str(port)
        if path is not None:
            url += path
        if query is not None:
            url += u'?' + query
        if fragment is not None:
            url += u'#' + fragment

        return url
def url ( self ) : scheme , auth , host , port , path , query , fragment = self url = u'' # We use "is not None" we want things to happen with empty strings (or 0 port) if scheme is not None : url += scheme + u'://' if auth is not None : url += auth + u'@' if host is not None : url += host if port is not None : url += u':' + str ( port ) if path is not None : url += path if query is not None : url += u'?' + query if fragment is not None : url += u'#' + fragment return url