Eric V. Smith <e...@trueblade.com> added the comment:

This is explicitly mentioned in PEP 572 as being disallowed:

"Due to design constraints in the reference implementation (the symbol table 
analyser cannot easily detect when names are re-used between the leftmost 
comprehension iterable expression and the rest of the comprehension), named 
expressions are disallowed entirely as part of comprehension iterable 
expressions (the part after each "in", and before any subsequent "if" or "for" 
keyword):"

The error message also makes it clear.

----------
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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

Reply via email to