3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 12:08:18 +00:00

Allow for __truediv__ and __rtruediv__ even when not using Python3

This commit is contained in:
Andrew V. Jones 2019-09-13 12:54:44 +01:00 committed by Nikolaj Bjorner
parent 1b83c677ea
commit 5d9ed5b0a9

View file

@ -8955,14 +8955,13 @@ class FPRef(ExprRef):
[a, b] = _coerce_fp_expr_list([other, self], self.ctx) [a, b] = _coerce_fp_expr_list([other, self], self.ctx)
return fpDiv(_dflt_rm(), a, b, self.ctx) return fpDiv(_dflt_rm(), a, b, self.ctx)
if not sys.version < '3': def __truediv__(self, other):
def __truediv__(self, other): """Create the Z3 expression division `self / other`."""
"""Create the Z3 expression division `self / other`.""" return self.__div__(other)
return self.__div__(other)
def __rtruediv__(self, other): def __rtruediv__(self, other):
"""Create the Z3 expression division `other / self`.""" """Create the Z3 expression division `other / self`."""
return self.__rdiv__(other) return self.__rdiv__(other)
def __mod__(self, other): def __mod__(self, other):
"""Create the Z3 expression mod `self % other`.""" """Create the Z3 expression mod `self % other`."""