I know that when it launched, a lot of people didn't think it would be picked up very easily. I was wondering if thats changed at all. Do many of the major modules and libraries support Python 3 yet? Is it gaining acceptance or are people mostly sticking with 2.x?
Python 3.0 final was released on December 3rd, 2008. Python 3.0 (a.k.a. "Python 3000" or "Py3k") is a new version of the language that is incompatible with the 2. x line of releases.
Python 3 makes coding more obvious and intuitive by removing duplicate constructs and modules; Python 3 simplifies multilingual support, with its core string type based on Unicode by default; Python 3 makes it easier to swap in any print function, now that Print () is built-in (rather than a statement);
Python 3.0 uses the concepts of text and (binary) data instead of Unicode strings and 8-bit strings. All text is Unicode; however encoded Unicode is represented as binary data. The type used to hold text is str , the type used to hold data is bytes . The biggest difference with the 2.
Python Versions. There are two major versions of the Python programming language: the Python 2. x series, and the newer Python 3. x series.
If you go to python.org
and click on Download, there's this message:
If you don't know which version to use, start with Python 2.7; more existing third party software is compatible with Python 2 than Python 3 right now.
I think that's the case. Python 2 is still more useful.
Example: you don't have WSGI working on python3 yet.
You could always write code in python2, and then port it to python3 later if all libraries are already ported, by running 2to3
. The opposite is not true: If you write python3 code and later want to use a library only on python 2, you're out of luck :( I think that's why python.org recommends python2 even for new projects, by suggesting you start with python 2.7.
Using python3 also doesn't buy you anything right now - there are some small niceties, but losing full 3rd party support far outweights the tiny gains of the small syntax changes and module relocations.
Don't get me wrong -- I love python3 and all the new nice things it can do, it's beautiful and much closer to the way I think python should be.
The thing is that using it just doesn't pay back, yet. You need either more benefits or less downfalls to make it worth the trouble.
The answer to all your questions are "Yes". :)
Do many of the major modules and libraries support Python 3 yet?
Yes.
Is it gaining acceptance
Yes.
or are people mostly sticking with 2.x?
Yes.
Your question is a bit fuzzy, namely. If you are wondering if you should use Python 2 or Python 3, then the answer is "Use Python 2". There are many who uses Python 3, but they wouldn't ask the question. :-)
I'd expect that to change in 1-2 years, when the answer will be "well, it depends". And in around 3 years the answer will be "Are you using a library/framework that hasn't been ported?"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With