Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

the := PEP stunk badly of cargo cult programming, you see knee-jerk proposals like that every time a blog makes the rounds and Guido deserved the pushback



I had to look this one up. PEP 572 [1] introduces "the walrus operator". Your claim that it "stunk badly" made me think that perhaps it was proposed and rejected, however it's listed as 'accepted' and among the new features from CPython 3.8. I suppose if you're the BDFL you can get your PEPs approved ;)

AFAICT it allows for optional binding. I suppose it might seem like 'cargo cult' because Rust and Swift have 'if let'?

[1] https://www.python.org/dev/peps/pep-0572/


It was accepted but that PEP caused the whole kerfuffle correct? It became fashionable to have a strong opinion on assignment vs equality.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: