(self, condition, explanation = None, *args)
Handles an error

        If the flag is in _ignored_flags, returns the default response.
        Otherwise, it sets the flag, then, if the corresponding
        trap_enabler is set, it reraises the exception.  Otherwise, it returns
        the default value after setting the flag.
Handles an error
Handles an error
def _raise_error(self, condition, explanation = None, *args):
        """Handles an error

        If the flag is in _ignored_flags, returns the default response.
        Otherwise, it sets the flag, then, if the corresponding
        trap_enabler is set, it reraises the exception.  Otherwise, it returns
        the default value after setting the flag.
        """
        error = _condition_map.get(condition, condition)
        if error in self._ignored_flags:
            # Don't touch the flag
            return error().handle(self, *args)

        self.flags[error] = 1
        if not self.traps[error]:
            # The errors define how to handle themselves.
            return condition().handle(self, *args)

        # Errors should only be risked on copies of the context
        # self._ignored_flags = []
        raise error(explanation)
def _raise_error ( self , condition , explanation = None , * args ) : error = _condition_map . get ( condition , condition ) if error in self . _ignored_flags : # Don't touch the flag return error ( ) . handle ( self , * args ) self . flags [ error ] = 1 if not self . traps [ error ] : # The errors define how to handle themselves. return condition ( ) . handle ( self , * args ) # Errors should only be risked on copies of the context # self._ignored_flags = [] raise error ( explanation )