by 333c · 2y ago · 0 comments
I'm not advocating for this feature to be added to Python, just explaining why it's not confusing in Ruby.
(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.