def __init__(self, url='<STR_LIT>', **kwargs):
<EOL>args = {k:kwargs[k] for k in ['<STR_LIT>', '<STR_LIT:host>', '<STR_LIT:path>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'] if kwargs.get(k) not in [None, {}, '<STR_LIT>']}<EOL>pr = urllib.parse.urlparse(str(url))<EOL>self.scheme     = kwargs.get('<STR_LIT>') or pr.scheme<EOL>self.host       = kwargs.get('<STR_LIT:host>') or pr.netloc<EOL>self.path       = self.normpath(urllib.parse.unquote(kwargs.get('<STR_LIT:path>') or pr.path))<EOL>self.params     = kwargs.get('<STR_LIT>') or pr.params<EOL>self.fragment   = kwargs.get('<STR_LIT>') or pr.fragment<EOL>d = Dict(**urllib.parse.parse_qs(kwargs.get('<STR_LIT>') or pr.query))<EOL>for k in d:<EOL><INDENT>d[k] = d[k][-<NUM_LIT:1>]     <EOL>if d[k] in [None, '<STR_LIT>']: _=d.pop('<STR_LIT:k>')<EOL><DEDENT>qargs = kwargs.get('<STR_LIT>') or {}<EOL>self.qargs = d<EOL>for k in qargs.keys():<EOL><INDENT>if qargs[k] in ['<STR_LIT>', None]: <EOL><INDENT>if k in self.qargs.keys():<EOL><INDENT>_=self.qargs.pop(k)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.qargs[k] = qargs[k]<EOL><DEDENT><DEDENT>if self.scheme == '<STR_LIT:file>' and self.host != '<STR_LIT>':<EOL><INDENT>self.path, self.host = self.join(self.host, self.path).path, '<STR_LIT>'<EOL><DEDENT>
create a URL object from the given url cast to str via str(url).
        The given url can be modified with the following key-word arguments:
        * scheme    = the URL scheme (http, file, mailto, etc.)
        * host      = the host server
        * path      = the path on the host server
        * params    = any URL parameters (begins with ;)
        * fragment  = URL fragment (begins with #)
        * query     = URL query (begins with ?)
        * qargs     = an alternative form of query, with the arguments already parsed into a dict