Hacker News new | past | comments | ask | show | jobs | submit login

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.



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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: