Live data from Hacker News

What’s New in Python 3.8

docs.python.org

251–260 of 381 posts

Re: What’s New in Python 3.8

#251
post #148
post #127

Earlier quoted context omitted.

Though not a language feature per say, I would love if the language would take on the packaging ecosystem and deliver a ground up approach that isn't just a kludge on a kludge on a kludge.

Unfortunately, that'd mean a package manager for C, Fortran, etc. as well, since so many Python packages have non-Python dependencies. I've started using Docker for ensuring prod behaves the same as dev. Going from Mac dev to Linux prod would otherwise cause trouble.

Sounds like Conda.

Re: What’s New in Python 3.8

#252

Earlier quoted context omitted.

> As a developer who has primarily developed applications in Python for his entire professional career, I can't say I'm especially excited about any of the "headlining" features of 3.8. Python is a fairly old, mature language. What features would you have been especially excited about?

A null coalescing operator

There was a now-deferred PEP for 3.8 https://www.python.org/dev/peps/pep-0505/

Re: What’s New in Python 3.8

#253
I stepped away from Python for about a year, and now I'm coming back to it. I hardly recognize the language. I'm not happy about this at all.

I don't really have a point, except that Python 3 feels like a moving target.

Re: What’s New in Python 3.8

#254
post #228
post #22

As a developer who has primarily developed applications in Python for his entire professional career, I can't say I'm especially excited about any of the "headlining" features of 3.8. The "walrus operator" will occasionally be useful, but I doubt I will find many effective uses for it. Same with the forced positional/keyword arguments and the "self-documenting" f-string expressions. Even when they have a use, it's us…

IMHO walrus operator goes against the zen of python. https://www.python.org/dev/peps/pep-0572/#differences-betwee... https://www.python.org/dev/peps/pep-0572/#relative-precedenc... Even examples of the spec shows how unintuitive and "unpythonic" this is. Explicit is better than implicit. IMHO adding features to the language to save 1 line of code for 10% of cases when you need it (I agree that there's occasional case…

I've been using Python since 1.5 and I feel like the language itself has been feature-complete for some time. In the 2.0 era, the big pain points were async and unicode; as demonstrated by, well, how painful Twisted's unicode was. ;)

But now if our big paint point is assigning a variable to len(), then in two lines evaluating that variable and printing it out, Python is just trying to find stuff to add.

I miss the size and simplicity of old Python. :/

Re: What’s New in Python 3.8

#255
post #22

As a developer who has primarily developed applications in Python for his entire professional career, I can't say I'm especially excited about any of the "headlining" features of 3.8. The "walrus operator" will occasionally be useful, but I doubt I will find many effective uses for it. Same with the forced positional/keyword arguments and the "self-documenting" f-string expressions. Even when they have a use, it's us…

> As a developer who has primarily developed applications in Python for his entire professional career, I can't say I'm especially excited about any of the "headlining" features of 3.8. Python is a fairly old, mature language. What features would you have been especially excited about?

Honestly? Performance and the possibility of making Pypy the reference implementation.

Re: What’s New in Python 3.8

#256
post #83

Earlier quoted context omitted.

The f-strings from 3.6 are a (relatively) recent feature that I have absolutely loved. I'd go so far as to say they are my favorite feature introduced by Python 3. I'm also looking forward to PEP-554 [0], which allows for "subinterpreters" for running concurrent code without removing the GIL or incurring the overhead of subprocesses. [0] https://www.python.org/dev/peps/pep-0554/

f-strings are great. Much nicer than ".format". I hope in a next iteration of the language all strings will be f-strings by default, avoiding the need to prefix them by a silly "f".

Explicit is better than implicit.

Re: What’s New in Python 3.8

#257

Earlier quoted context omitted.

f-strings are great. Much nicer than ".format". I hope in a next iteration of the language all strings will be f-strings by default, avoiding the need to prefix them by a silly "f".

Explicit is better than implicit.

Sure, the curly brackets are explicit enough. What do you mean?

Re: What’s New in Python 3.8

#258
post #71

Earlier quoted context omitted.

Yup, C and many other languages also have it: if (ptr = strchr(address, ':')) port = atoi(ptr + 1);

It doesn't do scoping, so not really the same.

it can in C++ (when specifying auto or a type). I thought it did in C as well, but apparently not.

Re: What’s New in Python 3.8

#259
post #190

Earlier quoted context omitted.

But that breaks normal equality tests for your type?

Wouldn’t parent’s code simply copy into Any every time it’s compared in a list? It is some spooky action at a distance.

Probably. I found it a bit confusing in any case.

Re: What’s New in Python 3.8

#260
post #188

Earlier quoted context omitted.

In the same vein, they could add syntax to distinguish introducing a variable from setting the value of an existing variable. Python's heuristics for that are pretty annoying.

I think that feature has exactly zero chances of getting adopted, but that's probably one of my top Python annoyances too. If it's any consolation, the scope of a variable isn't determined by heuristics, it's just that the rules are (IMO) kinda bad. Basically, if a variable is assigned (in addition to `=` and friends, `import`, `class` and `def` are also assignments in disguise) to in what Python calls a "block" (whi…

Yes, I meant the rules are bad. I called them heuristics, because I assume they came up with the rules as a heuristic to what would be the most useful behaviour.

Python didn't use to have lexical scoping, so the rules are retrofitting around that.

Post reply on HN