mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 20:18:18 +00:00
Allow for __truediv__
and __rtruediv__
even when not using Python3
This commit is contained in:
parent
1b83c677ea
commit
5d9ed5b0a9
|
@ -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`."""
|
||||||
|
|
Loading…
Reference in a new issue