开发者

Which one to learn Python 3.x or Python 2.x? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I wanted to learn the python programming but I d开发者_如何学编程on't know which one to learn, I mean I think there are some difference between the two languages and I wanted to know which one is going to be used in the future. It does make sense if I learn Python 2.x and it is stopped being used by anyone.

Any info please?


Most useful modules still aren't ported to Python3. So if you need to call such things you are better off learning Python 2.x until they are ported. Even today the standard version of Python that OSes call is 2.x. (For instance OSX Lion has 2.7.1) Unless there's a compelling reason to use 3.x (such as just learning it so you're ready) then go with 2.x.


I had this same question and am always wondering why choose one over the other. Here's my approach. I learned python3 because it seems to have more 'stuff' in it than python2, but because most of the things can be done in either version, I usually code in python2.

The reason, like Clark mentioned, is most of the modules I need are in python2 but as they slowly move to python3 I'll be a position to quickly move over(google app engine only supports python2 right now but I read they a considering python3 support). So far so good, other than a few sytax differences its pretty simple to code between both of them.

One thing I learned from coding is although the language can be measured for its differences, it doesn't really have a huge impact on programming(at least for what I have done so far). Programming is more about how you think and at a basic level all languages will have tools to get the job done, so focus on what comes naturally to you and you enjoy.

Best of luck

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜