Walrus operator looks like a great addition, not too much syntax sugar for a common pattern. Why were folks arguing about it?
What's Coming in Python 3.8
51–60 of 558 posts
Re: What's Coming in Python 3.8
#52Python looks more and more foreign with each release. I'm not sure what happened after 3.3 but it seems like the whole philosophy of "pythonic", emphasizing simplicity, readability and "only one straightforward way to do it" is rapidly disappearing.
Most code still look like traditional Python. Just like meta programming or monkey patching, the new features are used sparingly by the community. Even the less controversial type hints are here on maybe 10 percent of the code out there. It's all about the culture. And Python culture has been protecting us from abuses for 20 years, while allowing to have cool toys. Besides, in that release (and even the previous one)…
I think this metric is grossly overestimated. Or your scope for "out there" is considering some smaller subset of python code than what I'm imagining.
I think the evolution of the language is a great thing and I like the idea of the type hints too. But I don't think most folks capitalize on this yet.
Re: What's Coming in Python 3.8
#53Speaking as someone who has written Python code almost every day for the last 16 years of my life: I'm not happy about this. Some of this stuff seems to me like it's opening the doors for some antipatterns that I'm consistently frustrated about when working with Perl code (that I didn't write myself). I had always been quite happy about the fact that Python didn't have language features to blur the lines between what…
I'm not familiar much with Python, beyond a little I wrote in my linear algebra class. How much does the statement/literal distinction matter to readability? What does that do for the language?
Re: What's Coming in Python 3.8
#54Walrus operator looks like a great addition, not too much syntax sugar for a common pattern. Why were folks arguing about it?
It's the most controversial feature ever introduced because it goes against a lot of python culture and philosophy. All in all the debate has been heated and long, but it has been decided that the python community will use it intelligently and rarely, but that when it matters, it can help a lot. I'm against this feature, while I was pro f-string. However, I'm not too worried about missuse and cultural shift because I…
Re: What's Coming in Python 3.8
#55Earlier quoted context omitted.
> It's not clear to me what it does just from reading it How isn't it entirely obvious? := is the assignment operator in tons of languages, and there's no reason not to have assignment be an expression (as is also the case in many languages).
It's not in a language I've ever used (furthermore, I explicitly mentioned beginners in my comment).
Re: What's Coming in Python 3.8
#56Python looks more and more foreign with each release. I'm not sure what happened after 3.3 but it seems like the whole philosophy of "pythonic", emphasizing simplicity, readability and "only one straightforward way to do it" is rapidly disappearing.
“I've come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works. 2. Anything that's invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. 3. Anything invented after you're thirty-five is against the n…
Re: What's Coming in Python 3.8
#57Python looks more and more foreign with each release. I'm not sure what happened after 3.3 but it seems like the whole philosophy of "pythonic", emphasizing simplicity, readability and "only one straightforward way to do it" is rapidly disappearing.
“I've come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works. 2. Anything that's invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. 3. Anything invented after you're thirty-five is against the n…
Re: What's Coming in Python 3.8
#58Python looks more and more foreign with each release. I'm not sure what happened after 3.3 but it seems like the whole philosophy of "pythonic", emphasizing simplicity, readability and "only one straightforward way to do it" is rapidly disappearing.
happy python programmer since 1.5, currently maintaining a code base in 3.7, happy about 3.8.
Re: What's Coming in Python 3.8
#59Do parsers of previous pythons emit warnings: "this feature is not available in pythons 3.3 3.4 3.5 etc" ?
Re: What's Coming in Python 3.8
#60Earlier quoted context omitted.
It's the most controversial feature ever introduced because it goes against a lot of python culture and philosophy. All in all the debate has been heated and long, but it has been decided that the python community will use it intelligently and rarely, but that when it matters, it can help a lot. I'm against this feature, while I was pro f-string. However, I'm not too worried about missuse and cultural shift because I…
Oh come on, it doesn't.
They are most of the time a fantastic indicator of the cognitive load a feature will add in prod. Because of course a feature doesn't exist in a vacuum, it's always in a more complex context. So what's easy to understand for a student will be alright for a pro in the complexity of real life engineering. And I found the opposite to hold quite often as well.
I haven't tried the walrus on them yet, but I'm pretty sure of the result.