Pablo Galindo Salgado <[email protected]> added the comment:
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).
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43797>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com