code: def urljoin(netloc, port, ssl):
      
  
      rv = ("https" if ssl else "http") + "://" + netloc
      if ssl and port != 443 or not ssl and port != 80:
          rv += ":%i" % port
      return rv
docs: Basically the counter-part of :func:`urlsplit`.