Python 3.0 is out

Python trifecta or whatever the hell they are calling it is out.

Looks pretty similar, although the print “function” is (finally) now a true function.

I love their “Porting to Python 3.0” bit (my comments added):

  1. (Prerequisite:) Start with excellent test coverage. #lulz
  2. Port to Python 2.6. This should be no more work than the average
    port from Python 2.x to Python 2.(x+1). Make sure all your tests
    pass. #JHFC
  3. (Still using 2.6:) Turn on the -3 command line switch.
    This enables warnings about features that will be removed (or
    change) in 3.0. Run your test suite again, and fix code that you
    get warnings about until there are no warnings left, and all your
    tests still pass. #Fix until their are no warnings… no shit, really?
  4. Run the 2to3 source-to-source translator over your source code
    tree. (See 2to3 – Automated Python 2 to 3 code translation for more on this tool.) Run the
    result of the translation under Python 3.0. Manually fix up any
    remaining issues, fixing problems until all tests pass again. #does the 2to3 tool include a suicide pill?


About this entry