Python3 is destroying the Python cause analysis

Source: Internet
Author: User
Tags deprecated
Python 3 effortlessly becomes the worst thing that happens to the Python community. I remember the first time I used Python, I was spending a lot of time on the C + +, and Python was like one of my own. I can open a text editor with a few seconds or a few minutes to write a working program instead of hours or days. I remember when Python 2.5 came out, it brought a whole new bunch of neat language features. I love python, but I admit it has weaknesses, but it doesn't matter, all programming languages have. Its powerful place makes it interesting. Python 3 has some minor incremental improvements compared to Python 2, but at the same time loses a lot of Python 2 powerful stuff.

Python 2 A powerful place behind it is the huge third-party library, well, can do anything. Python 3 doesn't have this. Yes, a lot of libraries have been ported, but there are still 10 times times as many libraries without porting the past, and it's not easy. For example, you need to parse the x format, and x parsing is not simple, it is not a common format like YAML or JSON. It is possible that this parser for x has been written in Python 2, but has not yet been ported to Python 3. Also, porting will not be easy, given the fundamental difference between a Python 2 byte string (str) and a Python 3 byte string (bytes). It's actually difficult to transplant and requires a bit of porting skills, like maintaining Python 2 and Python 3 compatibility. So, you have some options, you can quickly write your app in Python 2 (a deprecated language), import some libraries (and all of their dependencies), maybe 10 times times the length, or you can use another programming language, it also has a lot of third-party libraries, but not the problem of Python 2/3. The second choice is obviously not very popular, because otherwise, we have a lot of Python 3 written app products, and then Python 2 of a large number of libraries will be ported over. (Translator Note: This logic seems to be a bit problematic?) Neither of these have happened. People either continue to write software in Python 2 or choose another language that does not face their own.

Another great thing about Python 2 is that programs written with it can almost always run on the next version of Python without much modification. If your company is running on software written in Python 2 (as many companies do), porting to Python 3 will be expensive because your requirements files can be very large and full of libraries that are not yet ported to Python 3. There is no sensible business reason to spend hundreds or millions of dollars worth of development time porting to Python 3. If it's cheaper than that, you might ask XXX to port their entire code base to Ruby. Now if you have to rewrite your software, would you choose Python 3? No.

The more popular libraries that support Python 2 and 3 almost all use only a subset of that language, which can be run on two platforms. SQLAlchemy, one of my favorite Python libraries, it does this very well. Django does the same, but it's not doing so well. This subset of languages, which I would call Python X, is boring to use, requires some kinky tricks, and is usually 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, because what makes Python great is the fun.

Python 2, sadly, has been deprecated. Python 3 is so decadent that no one uses it. Python 3 doesn't have much of a change. Did not bring much benefit, but the lack of lost a lot. Over the past few months, I have built some projects and services with Python 3. I'm not beaten by it. This is much like writing software in Python 2, except that you can only get a few libraries. There's nothing amazing about it. The python community should have moved to Python 3 in the last few years, but the result is more and more obvious that people are moving to new languages (or re-discovering old languages). Some of these languages also have good features like powerful input systems, pattern matching, better performance, improved multithreading and concurrency, simpler external function interfaces (FFI), more beautiful lambda statements, and so on.

One scenario is to fork Python 2.7 and then continue to develop the language, adding some features that are as backwards compatible as possible, so that Python 2 applications that cannot be ported (due to some financial constraints) can continue to evolve and improve, And that brings value to companies or individuals who invest so much time in developing them. This is the right thing to do (in fact, it would be best if Guido and the other dominant people in the Python community could do it officially rather than forcing everyone to fork it). Python 3 features can be ported back to Python 2 and then published in Python 2.8. Those who have spent time writing new software in pure Python 3 can use tools such as 3to2 to become compatible with Python 2.8. Python 3 can then silently leave for Python library maintainers to use Python 2 instead of Python x.

There are other options, but saving Python 2 is obviously the right thing to do, so it's a little bit of a story. The rescue of Python 2 will not come from the official, because those responsible for this kind of thing show great contempt for Python 2 users. If people in the community don't unite to save Python 2,python 3 years later will be the Python standard, then many libraries will be ported (though many certainly won't), then a lot of input will be wasted. The community would have shrunk a lot and lost the light of the past. Refer to Perl. People will forget it.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.