File: python3_print.patch

package info (click to toggle)
python-pyflow 1.1.20-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 996 kB
  • sloc: python: 4,154; sh: 219; ansic: 15; makefile: 5
file content (50 lines) | stat: -rw-r--r-- 1,255 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Index: python-pyflow/scratch/pybox/hijack.py
===================================================================
--- python-pyflow.orig/scratch/pybox/hijack.py
+++ python-pyflow/scratch/pybox/hijack.py
@@ -1,4 +1,4 @@
-
+from __future__ import print_function
 
 class A :
   def __init__(self) :
@@ -20,6 +20,6 @@ b.inc = a.inc
 
 b.inc()
 
-print "a", a.x
-print "b", b.x
+print("a", a.x)
+print("b", b.x)
 
Index: python-pyflow/scratch/pybox/inspect.py
===================================================================
--- python-pyflow.orig/scratch/pybox/inspect.py
+++ python-pyflow/scratch/pybox/inspect.py
@@ -1,7 +1,8 @@
+from __future__ import print_function
 
 def f(x) :
   return x + 2
 
 import inspect
-print inspect.getsource(f)
+print(inspect.getsource(f))
 
Index: python-pyflow/scratch/test/testtasks/slow_yeller.py
===================================================================
--- python-pyflow.orig/scratch/test/testtasks/slow_yeller.py
+++ python-pyflow/scratch/test/testtasks/slow_yeller.py
@@ -1,10 +1,11 @@
 #!/usr/bin/env python
+from __future__ import print_function
 
 import os,sys,time
 import datetime
 
 if len(sys.argv) != 2 :
-    print "usage $0 arg"
+    print("usage $0 arg")
     sys.exit(1)
 
 arg=sys.argv[1]