Commit efc92eec authored by Barry Warsaw's avatar Barry Warsaw

PEP 214, Extended print Statement, has been accepted by the BDFL.

Additional test cases for the extended print form.
parent 8c0a2422
......@@ -19,6 +19,10 @@ print_stmt
1 2 3
1 2 3
1 1 1
extended print_stmt
1 2 3
1 2 3
1 1 1
del_stmt
pass_stmt
flow_stmt
......
......@@ -260,6 +260,25 @@ print
print 0 or 1, 0 or 1,
print 0 or 1
print 'extended print_stmt' # 'print' '>>' test ','
import sys
print >> sys.stdout, 1, 2, 3
print >> sys.stdout, 1, 2, 3,
print >> sys.stdout
print >> sys.stdout, 0 or 1, 0 or 1,
print >> sys.stdout, 0 or 1
# syntax errors
def check_syntax(statement):
try:
compile(statement, '<string>', 'exec')
except SyntaxError:
pass
else:
print 'Missing SyntaxError: "%s"' % statement
check_syntax('print ,')
check_syntax('print >> x,')
print 'del_stmt' # 'del' exprlist
del abc
del x, y, (z, xyz)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment