def __str__(self): """Returns str(self).""" value = self._value if not value.path and self.is_absolute() and (value.query or value.fragment): value = value._replace(path='/') return url_unsplit(value)
def human_repr(self): return url_unsplit( SplitResult( self.scheme, self._make_netloc(self.user, self.password, self.host, self._val.port), self.path, self.query_string, self.fragment))
def human_repr(self): """ Returns a hooman readable string representing the URL. Returns ------- human_repr : `str` """ return url_unsplit(SplitResult(self.scheme, self._make_netloc(self.user, self.password, self.host, self._value.port), self.path, self.query_string, self.fragment))
def __str__(self): val = self._val if not val.path and self.is_absolute() and (val.query or val.fragment): val = val._replace(path='/') return url_unsplit(val)