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.
Recent comments
41 weeks 2 days ago
41 weeks 6 days ago
41 weeks 6 days ago
42 weeks 3 days ago
44 weeks 4 days ago
44 weeks 4 days ago
44 weeks 4 days ago
45 weeks 9 hours ago
45 weeks 11 hours ago
45 weeks 11 hours ago