Author Isaac Elliott
Recipients Isaac Elliott
Date 2018-06-04.04:05:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1528085120.11.0.592728768989.issue33766@psf.upfronthosting.co.za>
In-reply-to
Content
echo 'print("a");print("b")' > test.py

This program is grammatically incorrect according to the specification (https://docs.python.org/3.8/reference/grammar.html). But Python 3 runs it without issue.


It's this production here

simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE

which says 'simple_stmt's must be terminated by a newline. However, the program I wrote doesn't contain any newlines.

I think the grammar spec is missing some information, but I'm not quite sure what. Does anyone have an idea?
History
Date User Action Args
2018-06-04 04:05:20Isaac Elliottsetrecipients: + Isaac Elliott
2018-06-04 04:05:20Isaac Elliottsetmessageid: <1528085120.11.0.592728768989.issue33766@psf.upfronthosting.co.za>
2018-06-04 04:05:20Isaac Elliottlinkissue33766 messages
2018-06-04 04:05:19Isaac Elliottcreate