Yeah, it would be confusing. In Ruby, this would leave spam unmodified.
(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.
I'm not advocating for this feature to be added to Python, just explaining why it's not confusing in Ruby.