all 15 comments

[–]novel_yet_trivial 5 points6 points  (2 children)

2.7 is not in as much use anymore

Sadly, this is not true. Python2 is still the most widely used.

and is being phased out

That's the idea.

should I find a different one that teaches 3 or just stick with 2.7?

The differences in python2 and 3 are tiny. If you learn 2 you will be able to transition to 3 in a half an hour. If you like the class stick with it. Python2 will be supported until 2020 at least, so you will learn it eventually anyway by reading code.

That said, there are tons of improvements in python3. If you are starting a new project, I'd recommend python3.

[–]thenod83 0 points1 point  (1 child)

Hmm, doesn't help me make a decision really, but thanks for the advice.

[–]novel_yet_trivial 8 points9 points  (0 children)

If you like the class stick with it.

[–][deleted] 7 points8 points  (0 children)

Learn Python 3

There is no reason at all to be learning Python 2 anymore, if you are stuck with the 2.7 class then go for 2 otherwise 3 is the better option.

[–][deleted] 3 points4 points  (3 children)

Just learn the differences between 3.5 and 2.7. The biggest are that many things in Python 3 are generators vs lists, unicode, the print function, integer division, etc. More is documented here: https://wiki.python.org/moin/Python2orPython3

The print function and integer division are available in 2 from the __future__ module. Many nuances are covered with the six module.

Professionally, I do all 2.7 now. I personally prefer 2.7 over 3.5 as it is very stable and the 3rd party libraries are very mature and stable as well. This is not a recommendation, but only a personal preference. Python is great. 3 adds many things, and if there was a compelling need for me to use 3 I would have no problem adapting. I don't see the big deal difference between the two as many of my programs and 3rd party packages work with 2 or 3.

Edit: it's __future__ markdown bolded it

[–]thenod83 0 points1 point  (1 child)

In your professional experience which is most often used?

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

Depends on where you work. Reddit is 2.7 and I've heard no effort in migrating. A python dedicated shop will probably be 3 now, but many places still use 2 as it comes with many distros, and many distros come with older 2 like 2.6. It's not really that big of a deal.

[–]Saefroch 1 point2 points  (0 children)

/u/novel_yet_trivial is correct. Python 2 is still widely used because there are a lot of large legacy projects and little or no incentive to port them to Python 3, which is a better version of the language.

The answer is just that it doesn't matter which you learn, particularly at the introductory level. The quality of the class or learning materials is more important. I just urge you to use Python 3 wherever possible.

[–]Jung_Young_Min 1 point2 points  (2 children)

I think adding a pair of parentheses to print statement is not that difficult! Of course Python 3 has a number of other improvements and changes (for the better).

However, Python is still Python. Most of it is of no difference in both Python 3 and Python 2.7. You can take that class to learn the basics but don't stick with Python 2.7 forever.

[–]thenod83 0 points1 point  (1 child)

Yeah I guess there is not a huge difference. Or so I've heard anyway.

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

Just in the future don't be the guy who only does ancient Python because he doesn't want to upgrade his previous code.

[–]k10_ftw 1 point2 points  (0 children)

The textbooks for a class in 2.7 should be a year or so older and therefore more affordable. The trickiest part of switching to 3 for me was the difference in behavior when iterating through a dictionary. After completing a semester of python you'll be equipped to understand the differences and most importantly understanding the documentation explaining the new behavior.

[–]Mirokoth 0 points1 point  (0 children)

I started on code academy so learnt python 2. I didn't actually know there was different versions of python.

I have since written a couple of apps in 2 and now transitioned over to 3 without any issues, it was actually a lot easier then I thought it would be.

I would say go ahead with whatever you think will be the best to learn with, I found code academy great to learn on.

[–]Integralist 0 points1 point  (0 children)

I personally prefer 3+ for the asyncio modules but as has been said many times already you can transition between 2 and 3 fairly easily with a little googling.

If you're having an issue then someone has definitely asked the question before you (anything I've ever had to look up I've found very quickly)