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 ronaldoussoren
Recipients conqp, ronaldoussoren
Date 2020-09-16.09:03:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
You can already do this with the walrus operator:

# ---
def test():
    for i in range(10):
        yield (square := i * i)

        yield square + 1

# ---

This adds some parenthesis to your second alternative.
Date User Action Args
2020-09-16 09:03:29ronaldoussorensetrecipients: + ronaldoussoren, conqp
2020-09-16 09:03:29ronaldoussorensetmessageid: <>
2020-09-16 09:03:29ronaldoussorenlinkissue41795 messages
2020-09-16 09:03:29ronaldoussorencreate