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 Carl.Friedrich.Bolz
Recipients Carl.Friedrich.Bolz, aroberge, pablogsal
Date 2021-12-11.12:46:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639226783.49.0.625960267044.issue46042@roundup.psfhosted.org>
In-reply-to
Content
let's see whether I promised too much, I don't know CPython's symtable.c too well yet ;-). Will shout for help when I get stuck.

Anyway, here is a related bug, coming from the same symtable function symtable_add_def_helper, also with an imprecise error location:

$ cat x.py 
{i for i in range(5)
        if (j := 0)
            for j in range(5)}

$ ./python x.py 
  File "/home/cfbolz/projects/cpython/x.py", line 1
    {i for i in range(5)
    ^^^^^^^^^^^^^^^^^^^^
SyntaxError: comprehension inner loop cannot rebind assignment expression target 'j'
History
Date User Action Args
2021-12-11 12:46:23Carl.Friedrich.Bolzsetrecipients: + Carl.Friedrich.Bolz, aroberge, pablogsal
2021-12-11 12:46:23Carl.Friedrich.Bolzsetmessageid: <1639226783.49.0.625960267044.issue46042@roundup.psfhosted.org>
2021-12-11 12:46:23Carl.Friedrich.Bolzlinkissue46042 messages
2021-12-11 12:46:23Carl.Friedrich.Bolzcreate