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.
What’s New in Python 3.8
251–260 of 381 posts
Re: What’s New in Python 3.8
#252Earlier 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
Re: What’s New in Python 3.8
#253I don't really have a point, except that Python 3 feels like a moving target.
Re: What’s New in Python 3.8
#254As 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…
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
#255As 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?
Re: What’s New in Python 3.8
#256Earlier 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".
Re: What’s New in Python 3.8
#257Earlier 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.
Re: What’s New in Python 3.8
#258Re: What’s New in Python 3.8
#259Re: What’s New in Python 3.8
#260Earlier 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…
Python didn't use to have lexical scoping, so the rules are retrofitting around that.