Carl Friedrich Bolz-Tereick <cfb...@gmx.de> added the comment:
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' ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46042> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com