|
|
|
|
|
by JohnFen
997 days ago
|
|
> Sorry but that's nonsense. I'm not lying. This problem cost me a full weekend earlier this year. I may have misremembered the exact version numbers, though. Perhaps it wasn't between 2 and 3. Is there a Python 4? The problem is that you can't have one Python interpreter that covers all versions of Python, and Python is very unforgiving about using the wrong interpreter version. In any case, it was a serious problem that cost me a lot of time and really soured me on Python as an end user. I've not encountered a similar issue with any other language before, so this appears to be uniquely a Python thing. But I don't know. I'm happy enough to just avoid Python-based anything whenever possible now. |
|
If you have downloaded Python 2, you must have done it intentionally, it isn't even available from the Python.org website download anymore - and had not been for a long time.
>The problem is that you can't have one Python interpreter that covers all versions of Python, and Python is very unforgiving about using the wrong interpreter version.
Because it doesn't make sense. The language evolves. Nobody is going to stop working on it only because it could break some old code somewhere. The changes from 2 to 3 happened *15 years ago*.
There is no reason to try to compile/run old Python 2 code today - and if you still do need it for some reason, then you need to download the Python 2 version (which are still available, if you need them but one has to look for them). But then you better know what you are doing.
If some old code requires Python 2, any somewhat experienced Python developer will spot that right away (e.g. the use of print statement in Python 2 vs. print() function in Python 3 is a dead giveaway).
>In any case, it was a serious problem that cost me a lot of time and really soured me on Python as an end user. I've not encountered a similar issue with any other language before, so this appears to be uniquely a Python thing.
I don't doubt it has costed you a lot of time but this was a problem entirely of your own doing by not doing your homework.
You would have exactly the same problems if you tried to compile old K&R C code or C++ code from 20 years ago using modern compilers. Or tried to feed modern C# code to a compiler from 10 years ago. Or, God forbid, tried to run some modern Javascript code using old browser - or that old HTML with Flash and what not in a modern browser ...
Python is actually much more lenient in this regard because a major language change has happened only once, 15 years ago, with Python 2 being deprecated for well over a decade. The point releases are all upward compatible with no issues.