3
0
Fork 0
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:
Dan Liew 2017-06-26 11:29:00 +01:00
parent 849eb389e6
commit 896aae5606
4 changed files with 22 additions and 17 deletions

View file

@ -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)