summarylogtreecommitdiffstats
path: root/001-fix-python2-print.diff
diff options
context:
space:
mode:
authorDario Ostuni2019-07-05 13:14:34 +0200
committerDario Ostuni2019-07-05 13:14:34 +0200
commit437556e41e165a531daa4f57faa5aa609904ee6a (patch)
tree2c8fb03a960120e010ab5b699ef59307d37b4f6d /001-fix-python2-print.diff
downloadaur-python-logicmin.tar.gz
Initial commit
Diffstat (limited to '001-fix-python2-print.diff')
-rw-r--r--001-fix-python2-print.diff28
1 files changed, 28 insertions, 0 deletions
diff --git a/001-fix-python2-print.diff b/001-fix-python2-print.diff
new file mode 100644
index 000000000000..5c9a336964d1
--- /dev/null
+++ b/001-fix-python2-print.diff
@@ -0,0 +1,28 @@
+diff --git a/logicmin/assign.py b/logicmin/assign.py
+index b0a4478..75e2a69 100644
+--- a/logicmin/assign.py
++++ b/logicmin/assign.py
+@@ -1,3 +1,5 @@
++from __future__ import print_function
++
+ from fsm import *
+
+ class StateAssign:
+@@ -18,14 +20,14 @@ class StateAssign:
+ hist[solcost] = hist[solcost] + 1;
+ if solcost < mincost:
+ mincost = solcost
+- print "i",i,"cost",solcost
++ print("i",i,"cost",solcost)
+ fsm.PrintSol()
+ i = i + 1
+ #
+- print "total solutions=",i-1
++ print("total solutions=",i-1)
+
+ for k in range(1000):
+ if hist[k]>0:
+- print k,"=",hist[k]
++ print(k,"=",hist[k])
+
+