Modify examples to be both Python 2 and 3 compatible

For removing dependency on 2to3
This commit is contained in:
William S Fulton 2020-08-15 16:46:01 +01:00
commit 89bee6a7fa
37 changed files with 368 additions and 388 deletions

View file

@ -4,17 +4,17 @@ import example
a = example.Complex(2, 3)
b = example.Complex(-5, 10)
print "a =", a
print "b =", b
print("a = %s" % a)
print("b = %s" % b)
c = a + b
print "c =", c
print "a*b =", a * b
print "a-c =", a - c
print("c = %s" % c)
print("a*b = %s" % (a * b))
print("a-c = %s" % (a - c))
e = example.ComplexCopy(a - c)
print "e =", e
print("e = %s" % e)
# Big expression
f = ((a + b) * (c + b * e)) + (-a)
print "f =", f
print("f = %s" % f)