Earlier quoted context omitted.
This is an INCREDIBLE improvement. I'm so excited for it for myself, and I think it will also do wonders for getting new programmers comfortable with the language. Seeing exactly where in the line your error is, is amazing! IMO this 100% cements Python as the single most newbie-friendly language, if there was any question before now (or at least, before the release of 3.11).
I already move code into separate lines since this is currently missing. This is great indeed. (Although that might still make sense for debugging)
Python 3.11
111–120 of 156 posts
Re: Python 3.11
#112Python 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.
What kind you issues you get during deployment? I think if running on right version then there should not be any issues.
My impression at the time was that using it for server side stuff was fine (i have control of the server and simply install all the right things/versions myself) but packaging it up for end users to install on their desktops/mobile was a huge pain, there was no real easy/simple way to just export a self running installer that you double click (on windows/mac) or an IPA/APK (on ios/android) and end up with a running program the way users were used to from e.g. a bundled .net (at the time using mono, now ms provides cross platforms .net implementations themselves) or native c/c++ executable.
Re: Python 3.11
#113> 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…
Everybody talks about the pattern matching, but I'm excited about this. I'm going to upgrade ASAP just so for it.
Re: Python 3.11
#114Earlier 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…
What do you mean by reverse? You can certainly upgrade all packages locally and then run pip freeze again if you want to set up newer versions, or like manually change versions in your requirements.txt and `pip install --upgrade` to update them. For stronger reproducibility guarantees there's also `--require-hashes`, although admittedly freeze doesn't appear to support easily writing hashes to a requirements.txt.
> per the previous point, it probably won't come out the same as before.
I don't see how this follows. If you have frozen dependencies, it will.
> You're supposed to use pip to manage which python version each project is using. But you're supposed to use the installer for it that's distributed with the python runtime. But only certain versions of the python runtime...
No you use venv for that. Venv which has been available since python 3.3, in 2012, and on pip, ensurepip has been since 3.4, in 2014. If you're using a version of python that's 10 years old, I don't really know what to say.
> There's only one global repository. If you want to build some libraries and reuse them the same way you'd use a normal library dependency, you have to publish them to the global PyPi. I think there might be an expensive service that works around this, but there's no repository program that you can just spin up on your own servers.
I mean you can install from git directly: https://pip.pypa.io/en/stable/topics/vcs-support/#vcs-suppor..., and there is documentation on spinning up a local repository (which for packages, is just files in a known directory structure): https://packaging.python.org/guides/hosting-your-own-index/
Re: Python 3.11
#115Earlier quoted context omitted.
one more after that for 3.14.1
Then they just need to get the patch release up to 3.14.15 for maximum enjoyment. It's doable! 2.7 got all the way up to 2.7.18 (though that was a special case).
I think this qualifies as an even more special case.
Re: Python 3.11
#116Earlier quoted context omitted.
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…
> There's "pip freeze" but that's a one-time operation that you can't then reverse, so it's only usable for leaf applications. What do you mean by reverse? You can certainly upgrade all packages locally and then run pip freeze again if you want to set up newer versions, or like manually change versions in your requirements.txt and `pip install --upgrade` to update them. For stronger reproducibility guarantees there's…
You need to know, and maintain, both what you intended to depend on and what you physically ended up depending on. So in more sensible ecosystems you will have, e.g., Gemfile and Gemfile.lock. pip freeze is, effectively, the way you create Gemfile.lock, but it forces you to destroy Gemfile to do it. And so you can't really use it.
Re: Python 3.11
#117Earlier quoted context omitted.
I don't know; I've just written something in .net/c# and it's pretty bloddy difficult to deploy.
.NET can export self-contained single-file executable that doesn't require any runtime on the target computer/server. Python has solutions like PyInstaller, but it's not built-in and requires building on the same system. In .NET, you can use the built-in tools to export binaries for Linux from Windows.
Re: Python 3.11
#118Python 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.
I don't expect Python to support either of those things any time soon.
Re: Python 3.11
#119Earlier quoted context omitted.
Dependency management in python is much worse than most mainstream languages.
Here I agree, but it is quite far away from > more complicated than any other programming language ever conceived of
Re: Python 3.11
#120Earlier quoted context omitted.
Dependency management in python is much worse than most mainstream languages.
Here I agree, but it is quite far away from > more complicated than any other programming language ever conceived of