def _StartResponse(self, status, response_headers, exc_info=None):
    """A PEP 333 start_response callable.

    Implements the start_response behaviour of PEP 333. Sets the status code and
    response headers as provided. If exc_info is not None, then the previously
    provided status and response headers are replaced; this implementation
    buffers the complete response so valid use of exc_info never raises an
    exception.  Otherwise, _StartResponse may only be called once.

    Args:
      status: A string containing the status code and status string.
      response_headers: a list of pairs representing header keys and values.
      exc_info: exception info as obtained from sys.exc_info().

    Returns:
      A Write method as per PEP 333.

    Raises:
      InvalidResponseError: The arguments passed are invalid.
    """
    if not isinstance(status, str):
      raise InvalidResponseError('status must be a str, got %r (%r)' %
                                 (_GetTypeName(status), status))
    if not status:
      raise InvalidResponseError('status must not be empty')
    if not isinstance(response_headers, list):
      raise InvalidResponseError('response_headers must be a list, got %r' %
                                 _GetTypeName(response_headers))
    for header in response_headers:
      if not isinstance(header, tuple):
        raise InvalidResponseError('response_headers items must be tuple, '
                                   'got %r' % _GetTypeName(header))
      if len(header) != 2:
        raise InvalidResponseError('header tuples must have length 2, '
                                   'actual length %d' % len(header))
      name, value = header
      if not isinstance(name, str):
        raise InvalidResponseError('header names must be str, got %r (%r)' %
                                   (_GetTypeName(name), name))
      if not isinstance(value, str):
        raise InvalidResponseError('header values must be str, '
                                   'got %r (%r) for %r' %
                                   (_GetTypeName(value), value, name))
    try:
      status_number = int(status.split(' ')[0])
    except ValueError:
      raise InvalidResponseError('status code %r is not a number' % status)
    if 200 < status_number or status_number >= 600:
      raise InvalidResponseError('status code must be in the range [200,600), '
                                 'got %d' % status_number)

    if exc_info is not None:

      self._status = status_number
      self._response_headers = response_headers
      exc_info = None
    elif self._started_handling:
      raise InvalidResponseError('_StartResponse may only be called once'
                                 ' without exc_info')
    else:
      self._status = status_number
      self._response_headers = response_headers
    self._started_handling = True
    self._body = []
    self._written_body = []
    return self._Write
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/runtime/wsgi.py/WsgiRequest._StartResponse/swapped operands of `<`