PEP 214, Extended print Statement, has been accepted by the BDFL.
This change modifies Python's grammar to include the extended print form.
This commit is contained in:
parent
9b18adcd16
commit
0360663e8e
|
@ -33,7 +33,7 @@ simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE
|
||||||
small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | exec_stmt | assert_stmt
|
small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | exec_stmt | assert_stmt
|
||||||
expr_stmt: testlist ('=' testlist)*
|
expr_stmt: testlist ('=' testlist)*
|
||||||
# For assignments, additional restrictions enforced by the interpreter
|
# For assignments, additional restrictions enforced by the interpreter
|
||||||
print_stmt: 'print' (test ',')* [test]
|
print_stmt: 'print' ( [ test (',' test)* [','] ] | '>>' test [ (',' test)+ [','] ] )
|
||||||
del_stmt: 'del' exprlist
|
del_stmt: 'del' exprlist
|
||||||
pass_stmt: 'pass'
|
pass_stmt: 'pass'
|
||||||
flow_stmt: break_stmt | continue_stmt | return_stmt | raise_stmt
|
flow_stmt: break_stmt | continue_stmt | return_stmt | raise_stmt
|
||||||
|
|
Loading…
Reference in New Issue