Python Forum
Why is Python so hard to maintain
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why is Python so hard to maintain
#1
Computer systems, applications, languages etc evolve. There are updates. That is fine. But Python seems to have a core competence in backwards INcompatability. I’m wondering why that is.

So that leads to a tendency to need to keep multiple versions around. I currently have 2.7, 3.3 and 3.7. Switching between them is not easy.

I’ll post separately on the specific current problem, but I have long wondered why the complexity of installation etc and the multiplicity of incompatible versions. Ease of use does not seem to be front of mind.
Reply
#2
Please define “ease of use”
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply
#3
There is a simple answer to your question. If the developers keep every language feature just for backward compatibility the package is going to hit a gig pretty soon. How about C which is here almost 50 years? It could be 10GB now. This is what I think about the topic. Perhaps there is much more to tell about that. Perhaps some professional...
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#4
Ease of use?

"I know it when I see it" Big Grin
Things like transparency, things "just work", intuitiveness, clear documentation that doesn't require a degree in CS, clear diagnostics.
Zero time spent maintaining and converting and porting between versions. Upgrades etc add or expand functionality, not redefine it; backwards compatibility,

Some counter examples quickly off the top of my head
- Having to edit PATH variable in Windows to manage multiple versions. Actually, doing ANYTHING in a command shell in a windows environment is not ease of use. This is not DOS!
- pip installing module in the wrong place (my Python37 not Python33)
- redefining the type of the result of a library function between versions (struct.pack for example). very uncool.
- redefining the syntax of a basic function between versions (print for example)
Reply
#5
The only reason you should "need" older versions is because 1) your system requires it (AKA older linux distros use python2.x) and 2) if your using a program that didnt update their code requiring you to have multiple versions.

Regarding #2 i would consider it apart of the programmers fault for not building an executable with the required python version. They should have built it in mind of computer-illiterate folks use their programs. However it is common practice for python programmers to know how to use multiple versions of python, and invke them with whatever they use to type the code (IDE or editor). If your the first i would just aks the programmer

Switching between versions is only as hard as you make it. For me its as simple as invoking the correct python interpreter by modifying the the number given in the terminal
metulburr@ubuntu:~$ python2
Python 2.7.12 (default, Nov 12 2018, 14:36:49) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
metulburr@ubuntu:~$ python3
Python 3.6.1 (default, Jun  8 2017, 06:36:16) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
metulburr@ubuntu:~$ python3.7
Python 3.7.3 (default, Mar 26 2019, 01:59:45) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
All languages evolve. Its not just Python. Java 11 and 12. C++98, C++11 and c++14. The only major incompatibility is in the differences between python3.x and python2.x. And that was to fix a lot of issues. The change happened over a decade ago at this point. 2.x is considered obsolete now.
Recommended Tutorials:
Reply
#6
(Aug-15-2019, 02:33 PM)RMJFlack Wrote: But Python seems to have a core competence in backwards INcompatability. I’m wondering why that is.

They broke backward compatibility once. That does not make it a "core competence." They did it because there were problems with the language they wanted to fix. It's only a problem because a bunch of curmudgeons refused to update their code.

And the problem goes away in three and a half months. 2.7 support will end, and you can just stick to 3.x.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#7
(Aug-15-2019, 03:08 PM)RMJFlack Wrote: Actually, doing ANYTHING in a command shell in a windows environment is not ease of use. This is not DOS!
That is up to interpretation. It probably just because you are not use to it. In Arch Linux for example, after you install the operating system. You have to install the desktop (IE. the GUI). And some people dont ever isntall a GUI as they consider it to be laggy. A lot of linux servers are terminal only. There is not need for GUI. One of the first things i do in Windows is bring up a command prompt to bypass the GUI.

(Aug-15-2019, 03:08 PM)RMJFlack Wrote: Having to edit PATH variable in Windows to manage multiple versions.
I havent used Windows much in years so i could not say. Although doing anything in Windows takes forever in comparison to linux. I hate being in that operating system as everything is more work involved.

(Aug-15-2019, 03:08 PM)RMJFlack Wrote: pip installing module in the wrong place (my Python37 not Python33)
That is because you invoked the python3.7 pip then. What reason do you have anyways of having all them installed? You can use a virtual environment to handle multiple python versions much easier.

(Aug-15-2019, 03:08 PM)RMJFlack Wrote: redefining the syntax of a basic function between versions (print for example)
print was converted to a function in python3.x. This is commonly well known at this point.
(Aug-15-2019, 03:08 PM)RMJFlack Wrote: redefining the type of the result of a library function between versions (struct.pack for example). very uncool.
One change between python3.x and python2.x was bytes and strings. Like with any language, if you are using C++14 syntax and try to compile it in a c++98 compiler you are going to get errors. The same is true with python2.x/python3.x interpreters.

The fact that you are referring to python3.x/2.x incompatibilities refers me to think that most of your issues are in conjunction with those versions. I would use a python3.x tutorial at this point for everything. Python2.x is dead soon.
Recommended Tutorials:
Reply
#8
(Aug-15-2019, 03:28 PM)metulburr Wrote: Although doing anything in Windows takes forever in comparison to linux.

Meanwhile, I switched back to Windows because Linux is such a pain in the butt to deal with. Big Grin
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#9
(Aug-15-2019, 03:33 PM)metulburr Wrote:
(Aug-15-2019, 03:08 PM)RMJFlack Wrote: redefining the type of the result of a library function between versions (struct.pack for example). very uncool.
One change between python3.x and python2.x was bytes and strings. Like with any language, if you are using C++14 syntax and try to compile it in a c++98 compiler you are going to get errors. The same is true with python2.x/python3.x interpreters.

I would use a python3.x tutorial at this point. Python2.x is dead soon.

But WHY would they break existing code by redefining the type of the result of struct.pack, rather than introduce a NEW function struct.pack2byte or some such.

There is always a reason of course (and I am curious about this one) its just frustrating the amount of time I seem to have to spend figureing out whats changed and then figure out what I have to do with my code. Maybe the issue is that Im not doing this full time. Maybe Python is for pros only? I guess I have been able to gloss over the byte / string thing, looks like Im going to have to get a better understanding (it doesnt help that the code Im dealing with here was not written by me).
Reply
#10
(Aug-15-2019, 03:42 PM)RMJFlack Wrote: (it doesnt help that the code Im dealing with here was not written by me)
Are you converting a python2.x script to python3.x? There is 2to3 which would do the majority of the work for you.
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Hire a Python Programmer? It's hard because I don't know pythonforumuser 1 1,660 Feb-10-2020, 12:02 PM
Last Post: metulburr
  how hard to translate this to python? Skaperen 4 3,948 Oct-18-2017, 07:37 AM
Last Post: buran
  Should Learn Python The Hard Way's be in the forums list of books Yoriz 16 14,330 Nov-09-2016, 05:47 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020