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...
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.
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.
<
p>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.
These other articles I've written may be interesting to you as well:
Recent comments
1 week 20 hours ago
1 week 22 hours ago
2 weeks 4 days ago
3 weeks 6 hours ago
4 weeks 6 days ago
4 weeks 6 days ago
5 weeks 18 hours ago
5 weeks 2 days ago
5 weeks 3 days ago
5 weeks 3 days ago