Why Python 3?

Andrew Berg aberg010 at my.hennepintech.edu
Sat Apr 19 00:49:22 EDT 2014


On 2014.04.18 22:28, Anthony Papillion wrote:
> What is the general feel of /this/ community? I'm about to start a
> large scale Python project. Should it be done in 2 or 3? What are the
> benefits, aside from the 'it's the future' argument?
Python 3 is not the future; it is the present. If you're developing an application, just use Python 3.4 and don't look back unless you
absolutely positively *need* one of the big libraries that doesn't fully support Python 3 yet. The smaller ones either support it or have
been replaced, and the few remaining (e.g., Twisted, Django) are getting there. Python 2 still exists because there are very large existing
projects (some public, some private) that are not able to use Python 3 for some reason (like heavy dependence on a third-party that doesn't
support Python 3). If you are developing a new library, the decision is not likely going to be easy, but in general, I'd say the larger it
is, the more you should lean toward not having Python 2 support. Of course, there are going to be other factors such as your audience and
what, if any, third-party libraries you will need yourself. It's an awkward time to write a new library since supporting both 2 and 3 is a
major pain, and Python 2 is eventually going away, but you will still have a significant amount of people who will want to use the library
with things that can't support Python 3.

Use Python 2 if you must, but know that you will end up needing to migrate to Python 3 eventually.
It used to be that support for Python 3 among third-party libraries was small, but that is no longer true: http://python3wos.appspot.com/
-- 
CPython 3.4.0 | Windows NT 6.2.9200 / FreeBSD 10.0



More information about the Python-list mailing list