parameters: (self, status, headers, exc_info = None)
return_statement: return self.write
docstring: WSGI callable to begin the HTTP response.
docstring_summary: WSGI callable to begin the HTTP response.
docstring_tokens: WSGI callable to begin the HTTP response .
function: def start_response(self, status, headers, exc_info = None):
          """WSGI callable to begin the HTTP response."""
          # "The application may call start_response more than once,
          # if and only if the exc_info argument is provided."
          if self.started_response and not exc_info:
              raise AssertionError("WSGI start_response called a second "
                                   "time with no exc_info.")
          self.started_response = True
          
          # "if exc_info is provided, and the HTTP headers have already been
          # sent, start_response must raise an error, and should raise the
          # exc_info tuple."
          if self.req.sent_headers:
              try:
                  raise exc_info[0], exc_info[1], exc_info[2]
              finally:
                  exc_info = None
          
          self.req.status = status
          for k, v in headers:
              if not isinstance(k, str):
                  raise TypeError("WSGI response header key %r is not of type str." % k)
              if not isinstance(v, str):
                  raise TypeError("WSGI response header value %r is not of type str." % v)
              if k.lower() == 'content-length':
                  self.remaining_bytes_out = int(v)
          self.req.outheaders.extend(headers)
          
          return self.write
function_tokens: def start_response ( self , status , headers , exc_info = None ) : # "The application may call start_response more than once, # if and only if the exc_info argument is provided." if self . started_response and not exc_info : raise AssertionError ( "WSGI start_response called a second " "time with no exc_info." ) self . started_response = True # "if exc_info is provided, and the HTTP headers have already been # sent, start_response must raise an error, and should raise the # exc_info tuple." if self . req . sent_headers : try : raise exc_info [ 0 ] , exc_info [ 1 ] , exc_info [ 2 ] finally : exc_info = None self . req . status = status for k , v in headers : if not isinstance ( k , str ) : raise TypeError ( "WSGI response header key %r is not of type str." % k ) if not isinstance ( v , str ) : raise TypeError ( "WSGI response header value %r is not of type str." % v ) if k . lower ( ) == 'content-length' : self . remaining_bytes_out = int ( v ) self . req . outheaders . extend ( headers ) return self . write