tuples, index method, Python's design

Paul Boddie paul at boddie.org.uk
Sun Mar 2 15:35:19 EST 2008


On 2 Mar, 19:06, Alan Isaac <ais... at american.edu> wrote:
> On April 12th, 2007 at 10:05 PM Alan Isaac wrote:
>
> > The avoidance of tuples, so carefully defended in other
> > terms, is often rooted (I claim) in habits formed from
> > need for list methods like ``index`` and ``count``.
> > Indeed, I predict that Python tuples will eventually have
> > these methods and that these same people will then defend
> > *that* status quo.

You were more confident about this than I was. Still, nothing happens
if no-one steps up to do something about it.

> <URL:http://python.org/download/releases/2.6/NEWS.txt>
>
>     - Issue #2025 :  Add tuple.count() and tuple.index()
>
>       methods to comply with the collections.Sequence API.

Here's the tracker item that may have made it happen:

http://bugs.python.org/issue1696444

I think you need to thank Raymond Hettinger for championing the
cause. ;-)

Paul



More information about the Python-list mailing list