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 steven.daprano
Recipients EGN, steven.daprano, xtreak
Date 2019-10-22.13:03:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1571749421.26.0.051586084569.issue38556@roundup.psfhosted.org>
In-reply-to
Content
We're not mind-readers, how do you expect us to know what you tried if you don't tell us?

The walrus operator works for me:

    >>> [spam for c in "hello world" if (spam:=c.upper()) in 'AEIOU']
    ['E', 'O', 'O']

    >>> [(spam:=x**2, spam+1) for x in range(5)]
    [(0, 1), (1, 2), (4, 5), (9, 10), (16, 17)]


What did you try, and what happened?
History
Date User Action Args
2019-10-22 13:03:41steven.dapranosetrecipients: + steven.daprano, xtreak, EGN
2019-10-22 13:03:41steven.dapranosetmessageid: <1571749421.26.0.051586084569.issue38556@roundup.psfhosted.org>
2019-10-22 13:03:41steven.dapranolinkissue38556 messages
2019-10-22 13:03:41steven.dapranocreate