From 59b31ae8596f9606217b09d4e3f00dcf5aab8475 Mon Sep 17 00:00:00 2001 From: murphy Date: Wed, 22 Apr 2009 02:40:04 +0000 Subject: Improved Python scanner (issue #41). * fixed numeric literals * better Python 3 support * bugfixes, optimizations * added two more test files --- test/scanners/python/python3.in.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/scanners/python/python3.in.py (limited to 'test/scanners/python/python3.in.py') 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 -- cgit v1.2.1