Live data from Hacker News

What's New in Python 3.12

docs.python.org

1–10 of 120 posts

Re: What's New in Python 3.12

#2
I've been using python for the past 10+ years, and I've got to say that the new Syntactic formalization of f-strings (PEP 701) has got to be one of the most "huh?" changes I've seen in a while.

Was this such a big problem?

In my experience, the GIL, faster start-up times are so much higher on the totem pole, why this now?

Re: What's New in Python 3.12

#3

I've been using python for the past 10+ years, and I've got to say that the new Syntactic formalization of f-strings (PEP 701) has got to be one of the most "huh?" changes I've seen in a while. Was this such a big problem? In my experience, the GIL, faster start-up times are so much higher on the totem pole, why this now?

It's a small problem with a small solution

Re: What's New in Python 3.12

#4
What I would love to see in a future version of python is being able to do `user["email"]` or `user.email` independently of the reason. Sometimes both work, sometimes only one of the two and an error in throw for the other one. I don't care why, I just want it to work, it's such a basic feature.

Something even crazier would be to have an equivalent of `console.log` in python. It would be an amazing feature but I think I'm the only one wanting it. I know I can use `print` or different logger. But it's a lot more complicated to use and the output is a lot less navigable than in javascript. PHP also has `var_dump`. But we don't have any equivalent in python.

Re: What's New in Python 3.12

#5

I've been using python for the past 10+ years, and I've got to say that the new Syntactic formalization of f-strings (PEP 701) has got to be one of the most "huh?" changes I've seen in a while. Was this such a big problem? In my experience, the GIL, faster start-up times are so much higher on the totem pole, why this now?

Because someone got annoyed enough to write a pep then implement it? Python is not a company and GvR is not a CEO handing out marching orders from on high.

Hell, personal testimony, I don't give a rat's ass about the GIL or start-up times, but f-string limitations are a daily pain in the ass. So I'm absolutely grateful for whoever worked on this and looking forward to it.

Re: What's New in Python 3.12

#6

I've been using python for the past 10+ years, and I've got to say that the new Syntactic formalization of f-strings (PEP 701) has got to be one of the most "huh?" changes I've seen in a while. Was this such a big problem? In my experience, the GIL, faster start-up times are so much higher on the totem pole, why this now?

And in my experience, nesting f-strings and using quotes in f-strings is more useful than the GIL and faster start-up times, so YMMV.

Re: What's New in Python 3.12

#7

I've been using python for the past 10+ years, and I've got to say that the new Syntactic formalization of f-strings (PEP 701) has got to be one of the most "huh?" changes I've seen in a while. Was this such a big problem? In my experience, the GIL, faster start-up times are so much higher on the totem pole, why this now?

Two reasons seem obvious. F-strings are relatively new -- the code is maturing and the edge cases are being filled in. Second, everyone can't be working on the GIL and start-up times. There is a tipping point at a relatively low head count where adding developers decreases productivity.

Re: What's New in Python 3.12

#8
post #4

What I would love to see in a future version of python is being able to do `user["email"]` or `user.email` independently of the reason. Sometimes both work, sometimes only one of the two and an error in throw for the other one. I don't care why, I just want it to work, it's such a basic feature. Something even crazier would be to have an equivalent of `console.log` in python. It would be an amazing feature but I thin…

> What I would love to see in a future version of python is being able to do `user["email"]` or `user.email` independently of the reason. Sometimes both work, sometimes only one of the two and an error in throw for the other one. I don't care why, I just want it to work, it's such a basic feature.

It's an absolutely terrible idea and I'm thankful that there's so little chance it'll ever happen. I don't want random objects to become mappings, nor do I want mapping entries and their attributes to conflict. Javascript is a bad language and this is one of its worst features.

> Something even crazier would be to have an equivalent of `console.log` in python. It would be an amazing feature but I think I'm the only one wanting it. I know I can use `print` or different logger. But it's a lot more complicated to use and the output is a lot less navigable than in javascript.

You... can just call `logging.whatever()`, after having called `logging.basicConfig()` to set up your basic config?

I fail to see how that would change anything to navigability. `console.log` is not inherently navigable, it's the browser's console UI which provides some navigability.

Re: What's New in Python 3.12

#9

I've been using python for the past 10+ years, and I've got to say that the new Syntactic formalization of f-strings (PEP 701) has got to be one of the most "huh?" changes I've seen in a while. Was this such a big problem? In my experience, the GIL, faster start-up times are so much higher on the totem pole, why this now?

It's an open source project. If a developer wants to go out of their way to make a really cool improvement, goes through the approval process, has a clean implementation that doesn't add any backwards incompatibilities, why do you care? This isn't some private company where management tells people what to do and they have to do it.

People are so out of touch with how OSS, and the volunteer maintainers that operate it, work. It's a shame. The sense of entitlement in a subset of the userbase ("Why aren't they fixing MY issues RIGHT NOW!") is mindblowing.

Re: What's New in Python 3.12

#10

I've been using python for the past 10+ years, and I've got to say that the new Syntactic formalization of f-strings (PEP 701) has got to be one of the most "huh?" changes I've seen in a while. Was this such a big problem? In my experience, the GIL, faster start-up times are so much higher on the totem pole, why this now?

"Due to the changes in PEP 701, producing tokens via the tokenize module is up to 64% faster."
Post reply on HN