Python 2 or 3

Dan Stromberg drsalists at gmail.com
Fri Dec 2 23:42:06 EST 2011


On 12/2/11, Antti J Ylikoski <antti.ylikoski at tkk.fi> wrote:
>
> I'm in the process of learning Python.  I already can code
> objet-oriented programs with the language.  I have in my hands the
> O'Reilly book by Mark Lutz, Programming Python, in two versions: the
> 2nd Edition, which covers Python 2, and the 4th edition, which covers
> Python 3.
>
> In the "official Python site" so to speak, http://www.python.org, it
> is mentioned that the authors recommend the visitor, who is a novice,
> to learn Python 2 rather than Python 3, because most of existing
> software has been writen with Python 2.
>
> The O'Reilly book has some 1200 pages.  I would not want to invest
> such an amount of work and time to an obsolete language (i. e. Python
> 2).

It mostly depends on what sort of thing you're learning Python for.

If you have a project in mind that has large dependencies that still
require Python 2.x, then you're probably best off with 2.x for now.

Otherwise, go with 3.x.

Or do what I've been enjoying: Install 2.x and 3.x, and test with
both, each step of the way.  In this manner, you can pretty easily
write new code that runs on either equally well.  But again, there's
the matter of dependencies.

> What is the opinion of the wizards here, shall I learm Python 2 or
> Python 3?  I'm posting this here because I feel that this point is
> interesting to other students of Python.
>
>
> Cheers, Antti "Andy" Ylikoski
> Helsinki, Finland, the EU
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list