3 ms·
For us beginners, professionals from other areas that want to use Python as an additional tool, this situation is quite confusing. I'm doing Python MOOCs and mo
by transpy 10y ago
For us beginners, professionals from other areas that want to use Python as an additional tool, this situation is quite confusing. I'm doing Python MOOCs and most of them focus on Python 2. I don't have a massive code base to maintain like most of you, I just would like to know what path to follow, Py2 or jump already to Py3.
- Alex3917 10y agoJust import everything from the __future__ package at the top of each file when writing code. If you do that, any project you create won't take more than a day or two to upgrade to Python 3, so even though it's confusing you don't really need to think much about it until you're ready to upgrade. http://python-future.org/imports.html http://python-future.org/imports.html Basically don't worry about the MOOCs being in Python 2, the differences are trivial and you don't really need to understand them to be going down the right path.
- mkesper 10y agoPython3, that can be no question. Python2 is a dead end.
- SiVal 10y agoThere are old, but still good and sometimes best, learning materials for all mainstream languages. That creates a challenge for learners, because learners should be focusing on the future of the language, not its past. If you're learning C++ now, you really should be learning the C++1x style of writing it; if you're learning JavaScript, it should be ES6-style; and if you're learning Python, it should be Python 3. The older styles of these languages are still relevant to those who will need them for professional use on older code bases, but for a new user, they can be treated as more advanced material to be learned primarily for recognition but not for writing. Learn Python 3 now; add some Python 2 details later, if needed. And if you really love your Python 2 MOOC, go ahead and use it as an introduction. Almost everything they are showing you is both Python 2 AND Python 3, so you're learning Python 3. Then move on to intermediate-level material that is Python 3 and goes into a lot more detail, and you'll easily switch over.
- welder 10y agoPython3. They are the same for beginners and you won't notice any difference.
- sgnelson 10y agoI'm not a programmer, but I use Python as one of a variety of tools. I don't have time to keep up with the various nuances between the two versions, nor do I particularly care. But it is a pain that I have to spend more time than I would like trying to figure out which version to use, and what about all the code I've written so far, can I use that in the future? I'm not a happy camper about the whole thing. But again, I'm not someone who even understands all the intricacies of programming languages, I just want to use the tool to make my life easier. Having two different versions of what is supposed to be the same programming language doesn't do that. And at least in the case for something like Python (I'd argue it is very much an "every man's" programming language), this is a failure for these non-programmer users. IMO.