def set(self, url, strict=True):
        if isinstance(url, basestring):
            if isinstance(url, unicode):
                # URL's are defined to be in the ASCII character set.
                url = quote(url, ";/?:@&=+$,")
            self.clear(strict)
            try:
                self._parse(url, strict)
            except __HOLE__:
                self.clear(strict)
                raise
            else:
                self._urlstr = url
                self._badurl = False
        elif isinstance(url, self.__class__):
            self._set_from_instance(url)
        else:
            raise ValueError("Invalid initializer: %r" % (url,))
dataset/ETHPy150Open kdart/pycopia/aid/pycopia/urlparse.py/UniversalResourceLocator.set