News for hackers. Stuff that matters.

Ask HN: Which version of Python do HN'ers prefer at this point?

I've been using Python 2.x off and on for a number of years. However, I've just recently started playing with Python 3.2 for some project Euler problems to get familiar with the changes.

If you were starting to build new web apps in Python today, would you go with Python 2.7 or Python 3.x at this point?

( 10 comments | 14 points | on HN )
Re:Ask HN: Which version of Python do HN'ers prefer at this ... by wladimir on Tuesday July 31, 2012 @06:52AM (#4316578)
For a serious long term project I'd certainly use 3.x, to be future proof. It'll probably take some sorting out compatible packages, but it prevents a technical debt. Also the added performance, features and cleanups are worth it.

For a quick hack I'd still use 2.7 because everything is compatible so it should be easier to get up and running.

Re:Ask HN: Which version of Python do HN'ers prefer at this ... by jlarocco on Wednesday August 01, 2012 @12:42AM (#4321218)
I use 3.2 for almost everything.

I've built a couple small web apps, a few small PyQt apps, and a ton of utilities with it.

Only times I've used 2.x recently was when I needed OpenGL, and another time when I needed cgkit.

Basically the only time I use 2 is when I need a specific library and there's no alternative that runs on 3.

Re:Ask HN: Which version of Python do HN'ers prefer at this ... by anderspetersson on Tuesday July 31, 2012 @06:27AM (#4316526)
2.7

The switching point for me will be when django start support 3.x. Looks like Django 1.5 will add experimental support for Python 3.x. Then there will take at least a couple months for most of the vital packages to be compatible.

Re:Ask HN: Which version of Python do HN'ers prefer at this ... by zheng on Monday July 30, 2012 @06:15PM (#4314968)
Building a webapp, probably still 2.7

However, I much prefer 3.x. Much cleaner, better stdlib, and unicode everything. If you do use 2.7, please please please use 3.x printing though (from __future__ import print_function)

Re:Ask HN: Which version of Python do HN'ers prefer at this ... by codegeek on Monday July 30, 2012 @02:39PM (#4313925)
I guess it is 2.7 for me so far. One of the things with 3.x is that some major python frameworks are still not supporting it (Django, Flask etc.)
Re:Ask HN: Which version of Python do HN'ers prefer at this ... by runjake on Monday July 30, 2012 @01:30PM (#4313510)
2.x, because I mainly use it for web development (and some math/gfx stuff).
Re:Ask HN: Which version of Python do HN'ers prefer at this ... by kuasha on Friday August 03, 2012 @11:06PM (#4337350)
I use django- It gives no option for 3.x- Using 2.7 for my current project
Re:Ask HN: Which version of Python do HN'ers prefer at this ... by arjn on Monday July 30, 2012 @08:34PM (#4315453)
2.7 for me. Mainly web apps and back-end scripting.
Re:Ask HN: Which version of Python do HN'ers prefer at this ... by thdn on Wednesday August 01, 2012 @10:28PM (#4326895)
2.6, I use it with cx_oracle, for sysadmin tasks
Re:Ask HN: Which version of Python do HN'ers prefer at this ... by bobisme on Thursday August 02, 2012 @08:54PM (#4331919)
2.7 - Because of Django (mainly).