tuples, index method, Python's design

Roy Smith roy at panix.com
Sun Mar 2 16:52:27 EST 2008


In article 
<6d369e71-feb5-477d-a162-f6b0c4eb27f3 at k2g2000hse.googlegroups.com>,
 Paul Boddie <paul at boddie.org.uk> wrote:

> 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

Callooh! Callay!  We are delivered from one of the most long-lived and 
pointless (if minor) warts in an otherwise clean and logical type 
hierarchy.  Thank you, Raymond!



More information about the Python-list mailing list