code: def open(self, fullurl, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
          
          if isinstance(fullurl, bytes):
              fullurl = fullurl.decode()
          if isinstance(fullurl, str):
              req = Request(fullurl, data)
          else:
              req = fullurl
              if data is not None:
                  req.data = data
  
          req.timeout = timeout
          protocol = req.type
  
          # pre-process request
          meth_name = protocol+"_request"
          for processor in self.process_request.get(protocol, []):
              meth = getattr(processor, meth_name)
              req = meth(req)
  
          response = self._open(req, data)
  
          # post-process response
          meth_name = protocol+"_response"
          for processor in self.process_response.get(protocol, []):
              meth = getattr(processor, meth_name)
              response = meth(req, response)
  
          return response
docs: Accept a URL or a Request object
  
          Python-Future: if the URL is passed as a byte-string, decode it first.