tags:

views:

141

answers:

5

Is 2.x still the norm or would you recommend just coding in v3 at this point?

A: 

Google App Engine documentation states it uses Python 2.5 Today I happened to notice that Python Imaging Library is till not released for 3.x.

So, if you need those libraries or services, I guess you should wait.

DanJ
+2  A: 

Python 3 is still a long way off having universal support from tools, libraries and distros, so its use in production would depend very much on whether the bits you need (or are likely to need in the near future) have been ported.

For exploratory, educational and other uses, it depends very much on your own proclivity for living on the bleeding edge. If you are happy building from source and debugging and hacking third-party libraries to get things working, then you'll probably have no issues with Python 3. Otherwise, stick to the latest your distro offers, and if it is stuck on a really old Python — CentOS is still on 2.4! — you have my commiserations. Personally, I steer clear of CentOS for precisely this reason.

Marcelo Cantos
Wait...Do mean to say that in v2 you DON'T have to build from source, debug, or hack 3rd party libs?
John
Seems like 2.7 is still the conservative/safe option. Ex just found this, doesn't work in 3 due to print syntax but does fine in 2.7: http://code.activestate.com/recipes/277753-find-and-replace-string-in-all-files-in-a-director/
Crusader
@John, no, you never avoid it entirely, but you will have to do much more of it in Python 3, especially the hacking, since most Python stuff builds without incident on 2.x.
Marcelo Cantos
@Marcelo Cantos That's what I thought. I think your answer could be misconstrued as saying that you never have to in v2 though.
John
A: 

Do the frameworks and libraries you use have Python 3 versions? Libraries you use for development, and does your deploy stack support Python 3?

Many Python projects have a lot of dependancies, especially web based projects, most of which aren't Py3K ready yet.

If your stack is good, sure - Python 3 is the future, might as well embrace it now.

RyanWilcox
A: 

My main use of Python is Django. Support for 3.x for this framework still lies in the future, unfortunately, and who knows about any related modules - so no, it's not quite time for many people.

I actually bought Python 3 books last year when I started learning Python, thinking "I'll just start with 3 from the beginning!". That didn't work out, though.

Alex JL
Just curious, that's exactly what I did. Why didn't it work for you?
John
@John because I was learning Python in order to use Django. Django does not officially offer Python3 support, thought it can be patched. I didn't want to make things more difficult for myself, so I'm using 2.6 for now.
Alex JL
A: 

I've always used v3 primarily. "Hacking 3rd party libraries" to me is just like importing any other module. The only thing is since most stuff still uses v2 you have to know both versions and keep them straight when looking at others code.

John