News for hackers. Stuff that matters.
Re:Adding Syntax to the CPython Interpreter by trehalose on Saturday October 19, 2024 @01:50PM (#41889326)
Perhaps using a parenthesized assignment expression with the walrus operator would be unambiguous:

(spam := eggs) if bar

I think that seems reasonable? It would act just the same as it already does with an explicit `else None`, if I'm not mistaken. I don't find it beautiful though.

There are no comments on this comment yet.