4 ms·
I completely agree, one of the advantages of python is that it reads like pseudo-code for people not familiar with the language. Some of the proposed syntax cha
by gabythenerd 5y ago
I completely agree, one of the advantages of python is that it reads like pseudo-code for people not familiar with the language. Some of the proposed syntax changes are not that intuitive and require knowing how they work beforehand.
- BiteCode_dev 5y agoThere were already a lot of features like that: - context manager - decorators - inline conditions - else keywords in loops, which nobody knows even exist. - raise from (empty, or with params). - yield from (espacially with send()) - comprehension lists - advanced unpacking. This is valid: (a, (b, *c)) = [1, {*range(4)}] - advanced slicing. This is valid: foo[2:8:2] = bar[:4] Most of which existed in Python 2 already ! But it has never been a problem before. Why ? Because the community doesn't abuse features, it's part of the creed. But also because half of the python coders don't even know they exist (they are just trying to solve their problem, but dev is not their job), and are productive without it, so they just don't use it. In fact, a lot of tutorials on the internet never even mention those. Since the walrus came out, I used it once, and never saw it on a client code base. But when the community do use the features, they usually make things better: decorators made flask/click what it is, slicing made numpy/pandas what it is, type hints made fastapi/pydantic what they are. Those worries are mostly that: worries. They don't reflect what happens in practice.
- ahoka 5y agoI wanted to joke about still waiting for COME FROM to be added to Python, then I found it that someone already did that...
- popularonion 5y agoYou are right. Let's be real, if you're teaching Python to kids and bootcampers, you're going to only cover a little bit of what's in Python 2, and that's fine. The other stuff is mostly designed by framework authors to by used by framework authors. And having nice libraries and frameworks is what really makes this language so useful for everyone. It's trendy to claim Python is meant to be some kind of "pure environment" where the source code of Flask or SQLAlchemy or NumPy should just like a tutorial, but Python has never been that in the 10+ years I've been getting paid to use it. I thought that was the aspiration of Go. As far as I could tell, Hacker News commenters hated Go and now it's mostly ignored and forgotten here.