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 lys.nikolaou, pablogsal
Date 2021-01-22.01:27:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611278840.29.0.185730970308.issue42997@roundup.psfhosted.org>
In-reply-to
Content
There are several ways to implement this:

In PR24292 I implemented this idea by adding a new element to the grammar: '&&'. This allows to hard-expect a token: if the token is not there the parsing hard-fails immediately without trying anything else and displays an appropriate error message

The other possibility if we think that PR24292 is overkill is manually adding an "invalid_wathever" for every possible compound statement option that parses the statement with a !':' and then raises appropriately. This option is more verbose in the grammar but requires no new machinery.
History
Date User Action Args
2021-01-22 01:27:20pablogsalsetrecipients: + pablogsal, lys.nikolaou
2021-01-22 01:27:20pablogsalsetmessageid: <1611278840.29.0.185730970308.issue42997@roundup.psfhosted.org>
2021-01-22 01:27:20pablogsallinkissue42997 messages
2021-01-22 01:27:20pablogsalcreate