Re:Adding Syntax to the CPython Interpreter
by __mharrison__ on Saturday October 19, 2024 @11:55AM
(#41888529)
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.
[ Parent
| on HN ]
Re:Adding Syntax to the CPython Interpreter
by 8n4vidtmkvmk on Saturday October 19, 2024 @12:20PM
(#41888718)
Hence "make it an expression"
Re:Adding Syntax to the CPython Interpreter
by otabdeveloper4 on Saturday October 19, 2024 @01:11PM
(#41889031)
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.