Skip to content

Commit 5d9ed5b

Browse files
ayteyNikolajBjorner
authored andcommitted
Allow for __truediv__ and __rtruediv__ even when not using Python3
1 parent 1b83c67 commit 5d9ed5b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/api/python/z3/z3.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8955,14 +8955,13 @@ def __rdiv__(self, other):
89558955
[a, b] = _coerce_fp_expr_list([other, self], self.ctx)
89568956
return fpDiv(_dflt_rm(), a, b, self.ctx)
89578957

8958-
if not sys.version < '3':
8959-
def __truediv__(self, other):
8960-
"""Create the Z3 expression division `self / other`."""
8961-
return self.__div__(other)
8962-
8963-
def __rtruediv__(self, other):
8964-
"""Create the Z3 expression division `other / self`."""
8965-
return self.__rdiv__(other)
8958+
def __truediv__(self, other):
8959+
"""Create the Z3 expression division `self / other`."""
8960+
return self.__div__(other)
8961+
8962+
def __rtruediv__(self, other):
8963+
"""Create the Z3 expression division `other / self`."""
8964+
return self.__rdiv__(other)
89668965

89678966
def __mod__(self, other):
89688967
"""Create the Z3 expression mod `self % other`."""

0 commit comments

Comments
 (0)