3 ms·
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
by basic6 7y ago
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
- wyldfire 7y agoI 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/ https://www.python.org/dev/peps/pep-0572/
- basic6 7y agoIt was accepted but that PEP caused the whole kerfuffle correct? It became fashionable to have a strong opinion on assignment vs equality.