(self, scheme=misc.UseExisting, userinfo=misc.UseExisting,
                  host=misc.UseExisting, port=misc.UseExisting,
                  path=misc.UseExisting, query=misc.UseExisting,
                  fragment=misc.UseExisting)
return ParseResult(uri_ref=ref, encoding=self.encoding, **attrs_dict)
Create a copy of this instance replacing with specified parts.
Create a copy of this instance replacing with specified parts.
Create a copy of this instance replacing with specified parts .
def copy_with(self, scheme=misc.UseExisting, userinfo=misc.UseExisting,
                  host=misc.UseExisting, port=misc.UseExisting,
                  path=misc.UseExisting, query=misc.UseExisting,
                  fragment=misc.UseExisting):
        """Create a copy of this instance replacing with specified parts."""
        attributes = zip(PARSED_COMPONENTS,
                         (scheme, userinfo, host, port, path, query, fragment))
        attrs_dict = {}
        for name, value in attributes:
            if value is misc.UseExisting:
                value = getattr(self, name)
            attrs_dict[name] = value
        authority = self._generate_authority(attrs_dict)
        ref = self.reference.copy_with(scheme=attrs_dict['scheme'],
                                       authority=authority,
                                       path=attrs_dict['path'],
                                       query=attrs_dict['query'],
                                       fragment=attrs_dict['fragment'])
        return ParseResult(uri_ref=ref, encoding=self.encoding, **attrs_dict)
def copy_with ( self , scheme = misc . UseExisting , userinfo = misc . UseExisting , host = misc . UseExisting , port = misc . UseExisting , path = misc . UseExisting , query = misc . UseExisting , fragment = misc . UseExisting ) : attributes = zip ( PARSED_COMPONENTS , ( scheme , userinfo , host , port , path , query , fragment ) ) attrs_dict = { } for name , value in attributes : if value is misc . UseExisting : value = getattr ( self , name ) attrs_dict [ name ] = value authority = self . _generate_authority ( attrs_dict ) ref = self . reference . copy_with ( scheme = attrs_dict [ 'scheme' ] , authority = authority , path = attrs_dict [ 'path' ] , query = attrs_dict [ 'query' ] , fragment = attrs_dict [ 'fragment' ] ) return ParseResult ( uri_ref = ref , encoding = self . encoding , * * attrs_dict )