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 quentel
Recipients lys.nikolaou, pablogsal, quentel
Date 2021-11-15.14:41:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1636987261.75.0.479908594511.issue45807@roundup.psfhosted.org>
In-reply-to
Content
In CPython 3.10 :

Python 3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> @x = 123
  File "<stdin>", line 1
    @x = 123
     ^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?

but both suggestions lead to a SyntaxError :

>>> @x == 123
...
  File "<stdin>", line 2

    ^
SyntaxError: invalid syntax
>>> @x := 123
...
  File "<stdin>", line 2

    ^
SyntaxError: invalid syntax
>>>


Maybe an error message such as "cannot assign to decorator" would be more appropriate ?
History
Date User Action Args
2021-11-15 14:41:01quentelsetrecipients: + quentel, lys.nikolaou, pablogsal
2021-11-15 14:41:01quentelsetmessageid: <1636987261.75.0.479908594511.issue45807@roundup.psfhosted.org>
2021-11-15 14:41:01quentellinkissue45807 messages
2021-11-15 14:41:01quentelcreate