summaryrefslogtreecommitdiff
path: root/test/scanners/python/python3.in.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/scanners/python/python3.in.py')
-rw-r--r--test/scanners/python/python3.in.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/scanners/python/python3.in.py b/test/scanners/python/python3.in.py
new file mode 100644
index 0000000..178a798
--- /dev/null
+++ b/test/scanners/python/python3.in.py
@@ -0,0 +1,19 @@
+Old: print "The answer is", 2*2
+New: print("The answer is", 2*2)
+
+Old: print x, # Trailing comma suppresses newline
+New: print(x, end=" ") # Appends a space instead of a newline
+
+Old: print # Prints a newline
+New: print() # You must call the function!
+
+Old: print >>sys.stderr, "fatal error"
+New: print("fatal error", file=sys.stderr)
+
+Old: print (x, y) # prints repr((x, y))
+New: print((x, y)) # Not the same as print(x, y)!
+
+print("There are <", 2**32, "> possibilities!", sep="")
+
+
+b"byte string\99\"" \ No newline at end of file