News for hackers. Stuff that matters.
Re:Mojo: It’s Finally Here by IshKebab on Friday September 08, 2023 @07:35AM (#37432222)
Ah I misremembered. I was actually trying to do this

    x = [yield a for a in b]
Which yields (heh) an `Invalid Syntax` error. Thanks for the link to that PEP though - turns out the answer is that you almost always have to parenthesise it.

    x = [(yield a) for a in b]
> SyntaxError: yield inside list comprehension

Ok my original point stands.

There are no comments on this comment yet.