Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

Unfortunately this happens because to generate the error message we check for 
the equal and the right hand side of the equal (to also discard some false 
positives) and this triggers the parser to ask for additional tokens. Notice 
that you don't need to close the ']', just provide an additional token:

>>> x = [x=4
... f
  File "<stdin>", line 1
    x = [x=4
         ^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?

Unfortunately is not going to be easy to solve without looking at the right 
hand side :(

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44201>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to