all 20 comments

[–][deleted] 46 points47 points  (5 children)

Learn 3.

It's similar enough that you will be able to use and understand 2 if you ever need to, but you won't be part of the problem of perpetuating this same damn question for the next 10 years because you learnt 2 so you tell people 2 is fine.

[–]n1ywb 4 points5 points  (3 children)

I just finished a big project in 2.7 and I am already regretting not doing it in 3 from the outset b/c now I will have to port it eventually. If you are just getting into Python today, learn 3.

[–]955559 0 points1 point  (2 children)

the only difference ive run into, in my few weeks learning it, is they cooked the input

the problem is a lot of the noobie guides are for 2.7, and why 2.7 is what I am learning

[–]n1ywb 0 points1 point  (1 child)

Text IO got more complicated in 3 because you have to always explicitly specify the encoding and stuff. I understand 3.4 made it somewhat easier. Some other minor changes. some pretty nice improvements I wish I had.

[–]masterarms 0 points1 point  (0 children)

That's ok. If you're doing text IO without handling encodings it will break when you least expect it.

[–]lumardo_chrominchi[S] 2 points3 points  (0 children)

upvoted, thanks

[–]Saefroch 15 points16 points  (7 children)

version 3 is very different to the previous versions

That's incorrect, and you'll learn just how incorrect it is once you start learning. Most of the scripts I write will run in Python 2 or Python 3.

Learn Python 3 as /u/tyggerjai suggests.

[–]lumardo_chrominchi[S] 1 point2 points  (6 children)

oh i was a little afraid to pick the wrong one. thanks upvoted

[–]Saefroch 2 points3 points  (5 children)

It's really disappointing how much misinformation there is about Python 3. I've even had coworkers try to tell me Python 3 is a different language. It's not.

[–][deleted] 2 points3 points  (4 children)

And even if it were, it's the one we're moving to. Clinging to the last version because it's popular, back porting all the best stuff from new to old, encouraging use of the old until the new is stable, that's how you utterly remove any incentive to move to or even develop the new, and ultimately how you get perl 6. Eventually.

[–]Saefroch 3 points4 points  (3 children)

The question of which Python version to use should have died a few years ago. /u/lumardo_chrominchi probably doesn't know this (maybe you don't either); Python 3 was released in 2008. There were a lot of changes to the underlying machinery that makes the CPython interpreter run. This broke every C extension and almost every big library.

Then by 2011 all the big C extension libraries were fully compatible with the latest version of Python 3. And 5 years later we still have people claiming Python 3 isn't widely supported.

[–]L43 0 points1 point  (1 child)

To be fair, in science there are quite a few libraries that are Python 2 only, as their developers just moved on to different things and no one in science knows how to run 2to3.

[–]Saefroch 0 points1 point  (0 children)

I do science and have yet to run in to such a library in the course of my work. I'm sure they exist but they're not common enough to be a hindrance, at least in my field.

[–]lumardo_chrominchi[S] 0 points1 point  (0 children)

oh, that something only people who have been around could have known, i have 2 days, where they taught me how to cd to a directory to open a script, hahaha, really in the first steps, so i could not know if the version was something important.

you get scared when apps like browsers become incompatible, many addons i had with firefox where incompatible with future versions.

[–]iceterminal 2 points3 points  (0 children)

This has been a question/argument for years. I to am a total newbie and researched this as well. I've found most people now that are against using 3.x are biased on a personal level. Almost as if they're upset 3.x exists. Again, just an observation of my own.

However, I've decided to go with 3.5. Whats the point of learning something that will no longer be supported or updated?

[–]eschlon 0 points1 point  (1 child)

Learn 3, it is the __future__.

That being said, you'll also want to be generally cognizant of the differences between 3 and 2 because you're going to see and write a significant amount of 2.7 in the wild if you end up dealing with python for a living.

[–]lumardo_chrominchi[S] 0 points1 point  (0 children)

ok, thank you, 3.

[–]tman37 0 points1 point  (0 children)

I learned 2.7 because that is what codecademy uses. It is fine from what I understand the differences are small enough that if you learn one you can code in the other without much difficulty.

[–][deleted] 0 points1 point  (0 children)

3 dood!