mirror of
https://github.com/Z3Prover/z3
synced 2025-06-07 06:33:23 +00:00
Fix Python API examples so they work with Python 3 as well as Python 2.
This commit is contained in:
parent
849eb389e6
commit
896aae5606
4 changed files with 22 additions and 17 deletions
|
@ -1,5 +1,5 @@
|
|||
# Copyright (c) Microsoft Corporation 2015
|
||||
|
||||
from __future__ import print_function
|
||||
from z3 import *
|
||||
|
||||
def visitor(e, seen):
|
||||
|
@ -22,8 +22,8 @@ fml = x + x + y > 2
|
|||
seen = {}
|
||||
for e in visitor(fml, seen):
|
||||
if is_const(e) and e.decl().kind() == Z3_OP_UNINTERPRETED:
|
||||
print "Variable", e
|
||||
print("Variable", e)
|
||||
else:
|
||||
print e
|
||||
print(e)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue