Python 2.5 released
From: | Anthony Baxter <anthony-AT-python.org> | |
To: | python-list-AT-python.org, python-dev-AT-python.org, python-announce-AT-python.org | |
Subject: | RELEASED Python 2.5 (FINAL) | |
Date: | Tue, 19 Sep 2006 22:39:48 +1000 |
It's been nearly 20 months since the last major release of Python (2.4), and 5 months since the first alpha release of this cycle, so I'm absolutely thrilled to be able to say: On behalf of the Python development team and the Python community, I'm happy to announce the FINAL release of Python 2.5. This is a *production* release of Python 2.5. Yes, that's right, it's finally here. Python 2.5 is probably the most significant new release of Python since 2.2, way back in the dark ages of 2001. There's been a wide variety of changes and additions, both user-visible and underneath the hood. In addition, we've switched to SVN for development and now use Buildbot to do continuous testing of the Python codebase. Much more information (as well as source distributions and Windows and Universal Mac OSX installers) are available from the 2.5 website: http://www.python.org/2.5/ The new features in Python 2.5 are described in Andrew Kuchling's What's New In Python 2.5. It's available from the 2.5 web page. Amongst the new features of Python 2.5 are conditional expressions, the with statement, the merge of try/except and try/finally into try/except/finally, enhancements to generators to produce coroutine functionality, and a brand new AST-based compiler implementation underneath the hood. There's a variety of smaller new features as well. New to the standard library are hashlib, ElementTree, sqlite3, wsgiref, uuid and ctypes. As well, a new higher-performance profiling module (cProfile) was added. Extra-special thanks on behalf of the entire Python community should go out to Neal Norwitz, who's done absolutely sterling work in shepherding Python 2.5 through to it's final release. Enjoy this new release, (and Woo-HOO! It's done!) Anthony Anthony Baxter anthony@python.org Python Release Manager (on behalf of the entire python-dev team) -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html
Posted Sep 19, 2006 14:25 UTC (Tue)
by allesfresser (guest, #216)
[Link]
Many congratulations to the Python dev team on this release (especially the unified try/except/finally!) :-)
Posted Sep 19, 2006 21:51 UTC (Tue)
by dofwno (guest, #40609)
[Link] (3 responses)
Posted Sep 20, 2006 12:06 UTC (Wed)
by skaya (guest, #31233)
[Link]
If you mean "an array which starts at position 10000" (for instance), I think you can achieve that with a simple wrapper around getitem/setitem.
... If you mean something else, I would be grateful if you could clarify ?
Posted Sep 20, 2006 14:25 UTC (Wed)
by tjc (guest, #137)
[Link]
Posted Sep 21, 2006 20:01 UTC (Thu)
by kbob (guest, #1770)
[Link]
Just a small note for those using Plone (up to and including Plone 2.5) and wondering whether to try out this new release of Python with it: don't bother--it won't work at the moment. Certainly it will eventually but not now.Plone NOT compatible at present with Python 2.5
When can we expect to get arrays with arbitrary lower indices?Python 2.5 released
If by "arbitrary lower indices" you mean "negative indices", methinks this will not happen, since myarray[-1] means "the last element of myarray". But you can use a hashtable for that ;-)Python 2.5 released
Just curious: why do you want arrays with arbitrary lower indices?
Python 2.5 released
It's already available in Python 2.2.
Python 2.5 released
#!/usr/bin/python
class ArbitraryLowerBoundList(list):
def __init__(self, lower_bound=0, *args, **kwargs):
super(ArbitraryLowerBoundList, self).__init__(*args, **kwargs)
self.__offset = lower_bound
def lower_bound(self):
return self.__offset
def upper_bound(self):
return self.__offset + len(self)
def __setitem__(self, index, item):
s = super(ArbitraryLowerBoundList, self)
return s.__setitem__(index - self.__offset, item)
def __getitem__(self, index):
s = super(ArbitraryLowerBoundList, self)
return s.__getitem__(index - self.__offset)
if __name__ == '__main__':
a = ArbitraryLowerBoundList(10, ['a', 'b', 'c'])
assert a.lower_bound() == 10
assert a.upper_bound() == 13
assert a[10] == 'a'
a[11] = 'B'
assert a[11] == 'B'
assert a == ['a', 'B', 'c']