News for hackers. Stuff that matters.
Re:Python 3.2 Released by jefe78 on Monday February 21, 2011 @12:29AM (#2244378)
This is both wonderful and disappointing.

We're still pretty locked into 2.6. I'd love to move to 3.2 but it would break EVERYTHING!!!!(! added for emphasis!)

Maybe in ~10 years, everyone will be using 3.2, I know I can't wait! :D

Re:Python 3.2 Released by wisty on Monday February 21, 2011 @02:50AM (#2244691)
Remember the break from Numeric to numpy / scipy.core? Matplotlib managed to port OK, which was not small feat.

The fact that you could do lots of try/excepts helped:

try:

    import Numeric as np
    newaxis = np.NewAxis
    ...
 else:
    import numpy as np
    newaxis = np.newaxis
I think that was about 10 years ago. It took ~5 years to gain acceptance. Python 3 is < 2.5 years old (3.0 final was Dec, 2008), so it's not doing that badly.

The big problem seems to be whether both versions can run off the same source base, even with some voodoo (i.e. defining print functions, etc).

Re:Python 3.2 Released by dochtman on Monday February 21, 2011 @03:25AM (#2244739)
Move to 2.7 first, which should be fairly easy. From there, moving on to 3.x is much easier.
Re:Python 3.2 Released by logic on Monday February 21, 2011 @11:40PM (#2248768)
Agreed. Once I made the mental decision to stop supporting Python < 2.7, I ended up with at least one code base that runs under both 2.7 and 3.2. Switching to print() ("from __future__ import print_function"), basing error objects on Exception instead of StandardError, and wrapping loops over .items() or .keys() with list() were the only significant changes, and all of the above are available in 2.7. Runtime for a typical job was marginally slower (8-11%) in my testing with 2.7 vs. 3.1; more than acceptable for me.

(There's some variation in output, thanks to Unicode, but it's a variation that this project could live with.)