mirror of
https://github.com/Z3Prover/z3
synced 2025-06-06 06:03:23 +00:00
iterable is a Python 3 thingy
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
52e67b0d3e
commit
43d1ef2fee
1 changed files with 5 additions and 2 deletions
|
@ -50,7 +50,10 @@ import sys
|
||||||
import io
|
import io
|
||||||
import math
|
import math
|
||||||
import copy
|
import copy
|
||||||
from typing import Iterable
|
if sys.version < '3':
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
from typing import Iterable
|
||||||
|
|
||||||
Z3_DEBUG = __debug__
|
Z3_DEBUG = __debug__
|
||||||
|
|
||||||
|
@ -7513,7 +7516,7 @@ class Optimize(Z3PPObject):
|
||||||
def asoft(a):
|
def asoft(a):
|
||||||
v = Z3_optimize_assert_soft(self.ctx.ref(), self.optimize, a.as_ast(), weight, id)
|
v = Z3_optimize_assert_soft(self.ctx.ref(), self.optimize, a.as_ast(), weight, id)
|
||||||
return OptimizeObjective(self, v, False)
|
return OptimizeObjective(self, v, False)
|
||||||
if isinstance(arg, Iterable):
|
if sys.version >= '3' and isinstance(arg, Iterable):
|
||||||
return [asoft(a) for a in arg]
|
return [asoft(a) for a in arg]
|
||||||
return asoft(arg)
|
return asoft(arg)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue