def add(self, response, condition=None):
        """
        Add a new Response object
        :param response: The Response object
        :type  response: parser.trigger.response.Response

        :param condition: An optional Conditional statement for the Response
        :type  condition: parser.condition.Condition or None
        """
        self._log.info('Adding a new response with the priority level {priority}'.format(priority=response.priority))
        # If this is the first time we are seeing this priority level, ready a new response list
        if response.priority not in self._responses:
            self.sorted = False  # Only reset sorted flag on a new priority definition for efficiency
            self._responses[response.priority] = []

        # If this response requires a condition be met, assign it to the Response object directly
        if condition:
            self._log.debug('Response has a condition defined')
            self._conditionals[response] = condition

        self._responses[response.priority].append(response)
def add ( self , response , condition = None ) : self . _log . info ( 'Adding a new response with the priority level {priority}' . format ( priority = response . priority ) ) if response . priority not in self . _responses : self . sorted = False self . _responses [ response . priority ] = [ ] if condition : self . _log . debug ( 'Response has a condition defined' ) self . _conditionals [ response ] = condition self . _responses [ response . priority ] . append ( response )
Add a new Response object
        :param response: The Response object
        :type  response: parser.trigger.response.Response

        :param condition: An optional Conditional statement for the Response
        :type  condition: parser.condition.Condition or None