One of the most powerful parts of Python2 is the huge third-party library behind it. well, you can do anything. Python3 does not have this. Yes, many libraries have been transplanted, but there are still dozens of times that libraries have not been migrated, and it is not easy for Python 3 to become the worst thing in the Python community. I still remember the first time I used Python, I was still spending a lot of time on C ++, and Python was just like an opening. I can open the text editor and write a program that can work in seconds or minutes, instead of hours or days. I remember that when Python 2.5 came out, it brought a lot of new and concise language features. I love Python, but I admit it has weaknesses, but it doesn't matter. all programming languages have it. Its power makes it interesting. Python 3 has some minor incremental improvements compared with Python 2, but it also loses many powerful things of Python 2.
One of the most powerful parts of Python 2 is the huge third-party library behind it. well, you can do anything. Python 3 does not have this. Yes, many databases have been transplanted, but there are still dozens of times that libraries have not been transplanted, and it is not easy. For example, you need to parse the X format, which is not simple. it is not a common format like YAML or JSON. It is very likely that the X parser has been written in Python 2, but it has not been transplanted to Python 3. In addition, considering the fundamental difference between the byte string (str) of Python 2 and the bytes character string of Python 3, porting is not that easy. In fact, it will be difficult to transplant, and a little porting technique is needed, like maintaining the compatibility between Python 2 and Python 3. Therefore, you have some options. you can use Python 2 (an abandoned language) to quickly write your app and import some libraries (and all their dependencies ), it may take 10 times longer; or you can use another programming language. it also has many third-party libraries, but it will not face Python 2/3 problems. The second option is obviously not very popular, because otherwise, we will have a large number of app products written in Python 3, and then a large number of Python 2 libraries will be transplanted. (Note: Does this logic look a bit problematic ?) Neither of these occurs. People either continue to use Python 2 to write software, or choose another language that doesn't have their own faces.
Another powerful feature of Python 2 is that programs written with it can always run on the next version of Python without a lot of modifications. If your company runs software written in Python 2 (as in many companies), porting to Python 3 will consume a lot of money, because your requirements file may be very large, there are also various libraries that haven't been ported to Python 3. There is no rational business reason to spend hundreds or even millions of dollars worth of development time porting to Python 3. If it is cheaper, you may require xx to port their entire code library to Ruby. Now, if you have to rewrite your software, will you choose Python 3? No.
Almost all popular libraries that support Python 2 and 3 only use the subset of the language, so that they can run on both platforms. SQLAlchemy, one of my favorite Python libraries, is doing well. This is also true for Django, but it is not doing well. This subset of languages, I will call it Python X, is boring to use, requires some odd tricks, and is generally not as powerful as Python 2 or Python 3. Is it interesting to port the Python 2 Library to Python X? Sadly, it doesn't mean anything at all, because what makes Python great is this pleasure.
Python 2, sadly, has been abandoned. Python 3 is decadent and useless. Python 3 does not change much. There are not many benefits, but there are many missing ones. In the past few months, I have built some projects and services using Python 3. I was not defeated by it. This is similar to writing software using Python 2, except for obtaining a few libraries. There is nothing amazing here. The Python community has been transferred to Python 3 for the past few years, but the result is more and more obvious that people are moving to new languages (or old ones. These languages also have good features, such as powerful input systems, pattern matching, better performance, better multithreading and concurrency, and simpler external function interfaces (FFI ), more beautiful lambda statements and so on.
One solution is fork Python 2.7. then we will continue to develop this language and add some backward compatible features, which cannot be transplanted (due to some financial constraints) the Python 2 application can continue to evolve and improve, and bring value to companies or individuals who have invested so much time in development. This is the right thing to do (in fact, it would be best if other leaders in the Guido and Python communities could officially do this, rather than forcing everyone to fork ). The features in Python 3 can be ported back to Python 2, and then Python 2.8 is released. Those who have spent time writing new software using Python 3 can use a tool such as 3to2 to become compatible with Python 2.8. Python 3 can then be used to replace Python X with Python 2 for the Python library maintainers and leave quietly.
There are other solutions, but saving Python 2 is obviously the right thing to do, so it is not worth mentioning. The saving of Python 2 will not come from the official authorities, because the people responsible for such matters have shown great contempt for Python 2 users. If people in the community do not unite to save Python 2, Python 3 will become a standard for Python after several years, and many libraries will be transplanted (although many will certainly not ), then a lot of investment will be in vain. At that time, the community will shrink a lot and lose the light of the past. Refer to Perl. People will forget it.