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 aroberge, pablogsal, serhiy.storchaka
Date 2021-04-10.18:24:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618079073.78.0.916150373202.issue43797@roundup.psfhosted.org>
In-reply-to
Content
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).
History
Date User Action Args
2021-04-10 18:24:33pablogsalsetrecipients: + pablogsal, aroberge, serhiy.storchaka
2021-04-10 18:24:33pablogsalsetmessageid: <1618079073.78.0.916150373202.issue43797@roundup.psfhosted.org>
2021-04-10 18:24:33pablogsallinkissue43797 messages
2021-04-10 18:24:33pablogsalcreate