(f)
return clear_pending_pop_wrap
Pop the solver stack (if necessary) before calling the function.

    Some functions (e.g., get_value) required the state of the solver
    to stay unchanged after a call to solve. Therefore, we can leave
    th solver in an intermediate state in which there is a formula
    asserted in the stack that is not needed (e.g., when solving under
    assumptions). In order to guarantee that methods operate on the
    correct set of formulae, all methods of the solver that rely on
    the assertion stack, need to be marked with this decorator.
Pop the solver stack (if necessary) before calling the function.
Pop the solver stack ( if necessary ) before calling the function .
def clear_pending_pop(f):
    """Pop the solver stack (if necessary) before calling the function.

    Some functions (e.g., get_value) required the state of the solver
    to stay unchanged after a call to solve. Therefore, we can leave
    th solver in an intermediate state in which there is a formula
    asserted in the stack that is not needed (e.g., when solving under
    assumptions). In order to guarantee that methods operate on the
    correct set of formulae, all methods of the solver that rely on
    the assertion stack, need to be marked with this decorator.
    """

    @wraps(f)
    def clear_pending_pop_wrap(self, *args, **kwargs):
        if self.pending_pop:
            self.pending_pop = False
            self.pop()
        return f(self, *args, **kwargs)
    return clear_pending_pop_wrap
def clear_pending_pop ( f ) : @ wraps ( f ) def clear_pending_pop_wrap ( self , * args , * * kwargs ) : if self . pending_pop : self . pending_pop = False self . pop ( ) return f ( self , * args , * * kwargs ) return clear_pending_pop_wrap