From 5d9ed5b0a94807946ac3218fc24ecdfed288aa84 Mon Sep 17 00:00:00 2001 From: "Andrew V. Jones" Date: Fri, 13 Sep 2019 12:54:44 +0100 Subject: [PATCH] Allow for `__truediv__` and `__rtruediv__` even when not using Python3 --- src/api/python/z3/z3.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/api/python/z3/z3.py b/src/api/python/z3/z3.py index 3d77b9ed9..64b9b834f 100644 --- a/src/api/python/z3/z3.py +++ b/src/api/python/z3/z3.py @@ -8955,14 +8955,13 @@ class FPRef(ExprRef): [a, b] = _coerce_fp_expr_list([other, self], self.ctx) return fpDiv(_dflt_rm(), a, b, self.ctx) - if not sys.version < '3': - def __truediv__(self, other): - """Create the Z3 expression division `self / other`.""" - return self.__div__(other) + def __truediv__(self, other): + """Create the Z3 expression division `self / other`.""" + return self.__div__(other) - def __rtruediv__(self, other): - """Create the Z3 expression division `other / self`.""" - return self.__rdiv__(other) + def __rtruediv__(self, other): + """Create the Z3 expression division `other / self`.""" + return self.__rdiv__(other) def __mod__(self, other): """Create the Z3 expression mod `self % other`."""