I left Python learning because of Python 2 vs 3 [closed]
I wanted To learn how to program for the first time. Because i`m mainly practice on IT and Security, I choose to start with Python.
But, As is started to learn Python 3, I came to realize that Non of the modules I wanted to use were ported to Python 3, and even Django (one of the main reasons I wanted to learn python) and IronPython does not support python 3.
From my view, Python is not recommended for newbies because 1) Python 2 is about to be "out of future support" (the 2.7 is the last one). and 2) the Python 3 is not supported by the all important modules and frameworks... So - someone who wants to learn python from scratch and not wasting time on a version that is about to be out of support (2), as no any good options (nor 2 or 3 version)...
Please correct me if I`m wrong (and before I move to C# :) ).
Hello
I had the same question because I began to learn Python 2 months ago.
So after reading some posts and informations, I decided to start with Python, 2.71, why?:
1/ Python 2.7.1 is really stable and has all the great libraries.
2/ It will be maintened for a long time for all the bugs (but not for the functions) so there will be 2.7.2 2.7.3...
3/ You may use the 3.xx syntax in your 2.7 code with the __future__
statement.
Python 2 and Python 3 are close enough that learning on the earlier version will give you a very solid grounding for migrating to 3 when it becomes more mainstream.
Abandoning a language just because it's transitioning to a new version is a bit silly, frankly.
This is really subjective, if you ask me. In my opinion, learning Python 2 is not "a waste of time". Python 3 is very similar to Python 2, so switching to it whenever the time comes will be pretty easy.
Also, Python 2 is not "out of future support". It will be a long time before it is completely discontinued. By that time, most modules will be ported and Python 3 will be fully usable.
Also, check out 2to3, which will greatly aid the, well, 2 to 3 switch.
+1 to all the replies you've received already. Yes start with Python 2, especially as you want to use libraries that are only available in 2. But whilst you are doing this, check what the differences are. The one that has bitten me is the change to print. Very minor but If I'd written all my prints in a python3 style in the beginning, porting to 3 would have been trivial (python 2 supports the function style print).
精彩评论