开发者

has Python 3 been widely adopted yet?

I know that when it launched, a lot of people didn't think it would be pic开发者_运维问答ked 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?


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?"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜