October 6, 2007

No Print Statement? Python 3 Web Seminar

Young boy trying to be scary© Photographer: Freefly | Agency: Dreamstime.com
Of course, contemplating change is scary. But how scary, exactly, does it need to be? I have been asked to present a web seminar about what we might loosely term Python, the Next Generation, and rather than just touch on what I think are the interesting issues I wanted to find out what real people are interested in. So cardboard replicas may not apply.

Thanks, by the way, to everybody who has bothered to respond to the I Will Switch to Python 3.x ... poll. Six days left to run but I doubt that the answers are likely to change that much. Maybe I'll just run the next one a week,

So, please add a comment to this post (or mail me if you must ...) with your thoughts. What do you want to know about the future of Python? I can't guarantee to answer all questions, but I will try my best.

9 comments:

Bill Mill said...

My answer is that I'll switch as soon as I can have, or have replacements for, enough of {ipython, numpy, PIL, cherrypy, reportlab, MySqlDB}, where I define "enough".

Libraries > language

Unknown said...

ASAP, I'd like to start writing code that will run on 2.5+ or 3.0 - through "from future import" commands, perhaps? How do I do that?

Steve said...

Bill: OK, but I can't finish writing that piece until you *do* define enough. I suppose I'll have to ask the authors of those projects when they plan to port, then.

Catherine: I think it will be quite tricky to maintain compatibility between 2.5 and 3.0, as many of the advanced features aren't going to be backported until 2.6. Nevertheless I will try to find out what the best strategy is.

Lennart Regebro said...

I will switch As Soon As Possible, which is to say: Never, since most stuff in the Zope world can never ever move to Zope 3 unless there is a reasonable migration path which does not include maintaining two separate codebases as the same time.

Steve said...

Shall we just say I'm skeptical of "... never ever ... except ..." statements by prejudice? So there is a possibility, and we are talking about its magnitude, right?

Like, "it might be difficult"? Sure it might. Who knows?

Lennart Regebro said...

Th epossibility is that Guido & Co provides a practical upgrade path. So far they have flat out refused. I have no idea what could make them change their mind.

http://regebro.wordpress.com/2007/06/23/python-3000-and-compatibility/

If we take Catherines question above, how you start making code that runs on on Python 3.0 now, the question is: You don't. You can not today make code that is runnable on 3.0 and still run it on 2.x. When 2.6 comes, some if the thing will be available via __future__ (ie the print() function and some more stuff) but it seems most people agree that it will not be practically possible to write code that runs on both 2.6 and 3.0. The overlap is too small.

And if this is the case, it will in practice means that one of the largest Python communities around: The Zope/Plone community, will probably have to stay on 2.x forever.

Or, well... Maybe people who want more compatibility can make a completely unauthorized Python 2.7 that actually has a useful level of forward compatibility. That might be an option: Fork Python 2...

Steve said...

lennart: One can hope most users' experience will allign with the author of the piece you quote, whose last paragraph begins "For me, it’s looking good. I can’t find that many obvious problems that isn’t easily fixable [sic]".

I suspect you are being unduly alarmist. These issues have been addressed at the highest possible level: look at Guido's post-PyCon blog, starting at For me personally, this conference signified the coming together of the Python 3000 project. You can, of course, take it up personally with Guido there too, but the issues you raise are good ones to cover in a web seminar, where people may not have been as closely in touch with development. [It gets hard to follow sometimes, as I know as well as anyone].

People need to see a clear migration path.

Unknown said...

I plan on switching to 3.0 when, on any one project, the benefits of using 3.0 outweigh the inconveniences of moving to 3.0.

I believe most of the benefits will be in an improved library, and improved extension modules.

Since that part of Python 3.0 has only barely begun it's hard to see at this time any reason to change.

Taking a "Wait and See" attitude is very appropriate at this time.

Bill Mill said...

Steve, sorry for the late response, I forgot about my comment until your most recent post.

Anyway! it will depend on the project that I plan on doing, so since I can't see 3 years in the future, I can't tell you what's "enough". Right now, I maintain a 2.4 and a 2.5 installation, and use whichever one's convenient for any particular project.

I expect to be an early adopter of 3k, barring large-scale failure of library implementors moving towards it.