Python 2.5 alpha released

Python 2.5’s first alpha has been released. From a quick look at the What’s New in Python 2.5 document, what I thought was interesting…

Conditional expressions

When a variable has to be set to one thing or another, as in:


if something:
  print 'true'
else
  print 'false'

You can now use the syntax: print 'true' if something else 'false' PEP 308 discusses this a bit further.

quit() for the interactive interpreter

Not a particularly amazing feature… quit” and “exit” are now callable objects in the Python interpreter. That is, you can now type:


quit()

rather than having to enter the keystrokes Control+D, which I’ve always found annoying.

Not that I follow Python development that closely, but I’m sort of bummed that the inclusion of the “isa” keyword was shot down, and that the performance benefits brought by the Psyco project are not in this release.

Like this article? Please support my writing! Flattr my blog (see my thoughts on Flattr), tip me via PayPal, or send me an item from my Amazon wish list.