Live data from Hacker News

Python 3.11

docs.python.org

91–100 of 156 posts

Re: Python 3.11

#93
post #76

Earlier quoted context omitted.

Because of having to know what WSGI and ASGI are and picking the right one. Then pick which implementation of the above you want to use. Then configuring it correctly for your app. And finally make it play nicely with nginx/apache/whatever. If on the other hand you're trying to deploy a desktop app, that is an entirely different kettle of 'fun'.

That's not really a criticism of Python, is it? What do you want? One Way To Do Things with No Configuration with magical compatibility with nginx/apache/whatever ?

Well, according to the Zen of Python "there should be one- and preferably only one -obvious way to do it" :-P

Re: Python 3.11

#94
post #49

Earlier quoted context omitted.

Folks have given a number of good options here, but I thought I'd mention some other ones in case they're helpful for your use case. 1) docker! If you only plan on tinkering with something and don't want to install a bunch of random things on your machine, this command will start a python 2 image with access to the current directory: `docker run --rm -it -v "$PWD:/app" python:2.7 bash` (IIRC, on my phone atm!) (Windo…

I don't think Pycharm will install different versions for you, but if you have multiple versions installed, it is indeed super easy to switch between them. Though if you have a ton of packages you'll have to reinstall them all for the right version, and if you're dealing with lots of venvs + system installs, you have to make sure to choose the right thing from the dropdown and you might get somewhat lost and confused…

It does install them too - however I have the pro version, and I'm not sure if that's a pro feature or not.

Re: Python 3.11

#95
post #6

just spent about 4 hrs getting Python 2 and pip setup on my Mac. Any time I have the misfortune of needing to use python I get cold sweats at the thought of the environment stuff. Why is this still such a massive problem?

4 hours? Yeesh. Here's how to do it in 5-10 minutes. Use pyenv to install any python version and pyenv-virtualenv to manage virutal environments. https://github.com/pyenv/pyenv https://github.com/pyenv/pyenv-virtualenv

Anaconda is also great for beginners - GUI, lots of normal packages precompiled (also numpy, scipy, pandas, scikit-learn). If you do the full install, it comes with lots of packages pre-loaded.

Re: Python 3.11

#96
post #23
post #3

This is just a change log its better to link to the 3.11 what’s new: https://docs.python.org/3.11/whatsnew/3.11.html

Between this link and the OP, we're seeing the first improvements to drop from Mark Shannon's Microsoft-funded full-time work on CPython optimization, alongside Eric Snow and Guido van Rossum: https://www.theregister.com/2021/05/19/faster_python_mark_sh... https://github.com/markshannon/faster-cpython/blob/master/pl... - indicates that this is step 2 of 4, where the forthcoming steps actually plan to introduce JIT co…

> Between this link and the OP, we're seeing the first improvements to drop from Mark Shannon's Microsoft-funded full-time work on CPython optimization, alongside Eric Snow and Guido van Rossum

Oh good, after the proposals to speed up Python I didn't hear of any organisation stepping up to sponsor them. It's great to find that Microsoft did.

Re: Python 3.11

#97

Python is deceptive. They lure you in with its simplicity, and then one day you want to deploy your software and you realize that it's more complicated than any other programming language ever conceived of.

[deleted]

Re: Python 3.11

#98
> bpo-44590: All necessary data for executing a Python function (local variables, stack, etc) is now kept in a per-thread stack. Frame objects are lazily allocated on demand. This increases performance by about 7% on the standard benchmark suite. Introspection and debugging are unaffected as frame objects are always available when needed. Patch by Mark Shannon

That’s pretty massive! My impression of CPython was there were few performance improvements globally since 3. I’m having trouble finding benchmarks for all the minor versions.

Re: Python 3.11

#99
post #60

Earlier quoted context omitted.

Care to elaborate on what is bad? How bad are they compared to other languages? (Assuming you are always accepting some tradeoffs when moving from one eco system to another)

Off the top of my head: - What you get when you import a library depends on state that's scattered all over the system: system-managed packages, pip-managed system-global packages, pip-managed per-user packages, which virtualenv is currently active, which directory you're currently in, which directory the program you're running is in, whatever it is that conda does.... - There's no concept of reproducible builds or d…

You should check out poetry. It has greatly simplified almost all of what you have mentioned

Re: Python 3.11

#100

> When printing tracebacks, the interpreter will now point to the exact expression that caused the error instead of just the line. For example: Traceback (most recent call last): File "distance.py", line 11, in print(manhattan_distance(p1, p2)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "distance.py", line 6, in manhattan_distance return abs(point_1.x - point_2.x) + abs(point_1.y - point_2.y) ^^^^^^^^^ AttributeError: 'NoneType…

This can be found at [1].

[1] https://docs.python.org/3.11/whatsnew/3.11.html

Post reply on HN