Message390730
I have updated the PR with:
* Works for while statements (we can make it work for other kinds of statements but is a bit tricky because those have different grammar paths. We could do this in other PRs.
* I changed the error message for when the LHS is a name. In other cases we still want the special error message. For example:
>>> f() = 1
File "<stdin>", line 1
f() = 1
^
SyntaxError: cannot assign to function call. Maybe you meant '==' instead of '='?
If we still want something different we could say:
"cannot assign to ... here". The "here" makes it clear that in other places could be possible to do an assignment (for instance with names or attributes). |
|
Date |
User |
Action |
Args |
2021-04-10 18:24:33 | pablogsal | set | recipients:
+ pablogsal, aroberge, serhiy.storchaka |
2021-04-10 18:24:33 | pablogsal | set | messageid: <1618079073.78.0.916150373202.issue43797@roundup.psfhosted.org> |
2021-04-10 18:24:33 | pablogsal | link | issue43797 messages |
2021-04-10 18:24:33 | pablogsal | create | |
|