This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pablogsal
Recipients gregory.p.smith, gvanrossum, lys.nikolaou, pablogsal, rhettinger, serhiy.storchaka, slebedev
Date 2021-12-24.05:09:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1640322547.92.0.267047784581.issue46167@roundup.psfhosted.org>
In-reply-to
Content
> We managed to do this for 'with' so it should be possible here too, I'd think. The "committing" token would be the newline following the close parenthesis.


I am not so sure is that inmediate. Changing the assert statement from:

 'assert' a=expression b=[',' z=expression { z }]

to

    | 'assert' '(' a=expression b=[',' z=expression { z }] ')'
    | 'assert' a=expression b=[',' z=expression { z }] 

will render this invalid:

assert (a, b) <= c, "something"

The reason is that it will parse the (a, b) as the assert statement eagerly and then it will fail to parse the rest.
History
Date User Action Args
2021-12-24 05:09:07pablogsalsetrecipients: + pablogsal, gvanrossum, rhettinger, gregory.p.smith, serhiy.storchaka, lys.nikolaou, slebedev
2021-12-24 05:09:07pablogsalsetmessageid: <1640322547.92.0.267047784581.issue46167@roundup.psfhosted.org>
2021-12-24 05:09:07pablogsallinkissue46167 messages
2021-12-24 05:09:07pablogsalcreate