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 eric.smith
Recipients EGN, eric.smith, steven.daprano, xtreak
Date 2019-10-22.15:46:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1571759162.83.0.139224027428.issue38556@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-10-22 15:46:02eric.smithsetrecipients: + eric.smith, steven.daprano, xtreak, EGN
2019-10-22 15:46:02eric.smithsetmessageid: <1571759162.83.0.139224027428.issue38556@roundup.psfhosted.org>
2019-10-22 15:46:02eric.smithlinkissue38556 messages
2019-10-22 15:46:02eric.smithcreate