Message376412
Minimal example
>>> a{ # or
>>> a {
In 3.8, this is immediately flagged as a SyntaxError. In 3.9 and master, a continuation prompt is issued. This strikes me as a parsing buglet that should preferably be fixed, as it implies that something valid *could* follow '{', thus misleading beginners. On the other hand, after scanning my keyboard, '{' seems unique in being a legal symbol, unlike `, $, and ?, or combinations like +*, that can AFAIK never follow a name. So it would need special handling.
Side note: for the same reason I dislike the { change, I like the generic 3.9 change for legal operators without a second operand.
>>> a *
Both flag as SyntaxError, but in 3.8, the caret is under '*', falsely implying that '*' cannot follow a name, while in 3.9, it is under the whitespace following, correct implying that the * is legal and that the problem is lack of a second expression (on the same line without continuation). |
|
| Date |
User |
Action |
Args |
| 2020-09-04 22:47:56 | terry.reedy | set | recipients:
+ terry.reedy, gvanrossum, lys.nikolaou |
| 2020-09-04 22:47:56 | terry.reedy | set | messageid: <1599259676.82.0.121583428889.issue41659@roundup.psfhosted.org> |
| 2020-09-04 22:47:56 | terry.reedy | link | issue41659 messages |
| 2020-09-04 22:47:56 | terry.reedy | create | |
|