Slashdot Mirror


Python 3.0 To Be Backwards Incompatible

Stony Stevenson writes "Organizations using Python will be affected in a major way by changes in store for the language over the course of the next twelve months, Linux.conf.au attendees were told this morning. The Python development community is working towards a new, backwards-incompatible version of the language, version 3.0, which is slated for release in early 2009. Anthony Baxter, the release manager for Python and a senior software engineer at Google Australia, said "We are going to break pretty much all the code. Pretty much every program will need changes." Baxter also added another tidbit for attendees, saying that Python accounts for around 15 percent of Google's code base."

8 of 438 comments (clear)

  1. Another Shock Story by LowSNR · · Score: 5, Informative

    If the editors read the article rather than posting shock stories, Python 2.6 will also be released at the same time and will not break backwards compatibility. Python is not pulling the rug out from under its developers as the summary would lead you to believe.

  2. print as function vs. keyword by spookymonster · · Score: 5, Informative

    The biggest incompatibility is how you output to stdout. Instead of doing

        print "This used to work"

    You now have to do

        print("This is how 3.0 rolls")

    There will be no grandfathering, so everything needs to be refactored accordingly.

    A small, but significant change.

    --
    - Despite popular opinion, I am not perfect.
  3. Re:Workaround... by tuffy · · Score: 5, Informative

    Actually, Python2.6 is slated to include a tool which will update purely syntactic differences to Python 3 automatically. There are some issues it won't be able to fix, but Python2.6 will have a mode which will generate warnings about those so that they can be fixed well before Python 3's release.

    --

    Ita erat quando hic adveni.

  4. Almost 2 years old? by Anonymous Coward · · Score: 5, Informative
    People only reading the summary and shooting from the hip should realize:
    • Python 3 (or Python 3000 as it was called) as a serious effort is more than a year old.
    • There is already a working interpreter in its second alpha release.
    • Final release is slated for August. (No infinite Perl 6 development.)
    • Developers are working very hard to make the 2 to 3 transition as painless as possible.
    • The Python team is committed to keeping the 2.x series going until 3.x has clearly been accepted.
    You may now proceed to complain having been thus informed. :)
  5. in fact, such a utility already exists by Reality+Master+201 · · Score: 5, Informative

    http://svn.python.org/view/sandbox/trunk/2to3/

    And, as others have stated, there'll be the 2.6 branch, which will be backwards compatible.

    Or, in other words, the story is stupid and misleading.

  6. Re:Just rename it. by Bogtha · · Score: 5, Informative

    The vast majority of the language and standard library will remain the same. This is just about tidying up some unfortunate warts that affect a lot of people, such as unifying the different string types. It remains Python in practically every way, and renaming it is simply unnecessary.

    --
    Bogtha Bogtha Bogtha
  7. Re:Damn right by pthisis · · Score: 5, Informative

    1. Python 2.6 is still due out and will be supported for years.
    2. Python 3.0 includes a 2to3 script to convert existing Python code to Python 3
    3. The incompatibilities are mostly mechanical, by far the largest is the change of "print" from a statement to a function (which simplifies the implementation and makes converting existing programs to log to files or whatever much easier). I've yet to find any of my code that 2to3 doesn't handle just fine.

    --
    rage, rage against the dying of the light
  8. Re:It's a race by Incongruity · · Score: 5, Informative

    See, the funny thing is that the changes going into Python 3 are fixes for much of what people have complained about in Python 2.x and prior.

    Moreover, every step of the way they've built translators to move code from 2.x compatibility to 3.0 compatible -- and it'll catch when it can't translate the code and tell you as much. It seems pretty slick from everything I've seen. In many cases the fixes are ones you could easily do yourself in seconds with a good text editor. This will be a minor speed-bump for most users

    For more info, check out the recent Doctor Dobb's Journal interview (audio) with David Goodger -- it's about PyCon 2008, but it also covers Python 3 as well.