code: def uri_from_parts(parts):
      "simple function to merge three parts into an uri"
      uri = "%s://%s%s" % (parts[0], parts[1], parts[2])
      if parts[3]:
          extra = '?'+urlencode(parts[3])
          uri += extra
      return urf uri_from_parts(parts):
      "simple function to merge three parts into an uri"
      uri = "%s://%s%s" % (parts[0], parts[1], parts[2])
      if parts[3]:
          extra = '?'+urlencode(parts[3])
          uri += extra
      return uri
docs: simple function to merge three parts into an uri