Hacker News new | ask | show | jobs
by __mharrison__ 610 days ago
This doesn't work because the if statement is a statement. Statements don't evaluate to anything in Python, so you can't assign it to x.
1 comments

Hence "make it an expression"
It's way to late to fix the "statement vs expression" bug in Python's design.

We could have done that in the v3 switch, but we decided to spend man-centuries of effort on chasing already deprecated legacy Windows Unicode semantics instead.