(self, expr, assumptions=True)
return res
Evaluate self(expr) under the given assumptions.

        This uses only direct resolution methods, not logical inference.
Evaluate self(expr) under the given assumptions.
Evaluate self ( expr ) under the given assumptions .
def eval(self, expr, assumptions=True):
        """
        Evaluate self(expr) under the given assumptions.

        This uses only direct resolution methods, not logical inference.
        """
        res, _res = None, None
        mro = inspect.getmro(type(expr))
        for handler in self.handlers:
            cls = get_class(handler)
            for subclass in mro:
                try:
                    eval = getattr(cls, subclass.__name__)
                except AttributeError:
                    continue
                res = eval(expr, assumptions)
                if _res is None:
                    _res = res
                elif res is None:
                    # since first resolutor was conclusive, we keep that value
                    res = _res
                else:
                    # only check consistency if both resolutors have concluded
                    if _res != res:
                        raise ValueError('incompatible resolutors')
                break
        return res
def eval ( self , expr , assumptions = True ) : res , _res = None , None mro = inspect . getmro ( type ( expr ) ) for handler in self . handlers : cls = get_class ( handler ) for subclass in mro : try : eval = getattr ( cls , subclass . __name__ ) except AttributeError : continue res = eval ( expr , assumptions ) if _res is None : _res = res elif res is None : # since first resolutor was conclusive, we keep that value res = _res else : # only check consistency if both resolutors have concluded if _res != res : raise ValueError ( 'incompatible resolutors' ) break return res