Skip to content

Comment on Adding syntax to the CPython interpreterparent

Comments

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.