[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: tuples, index method, Python's design

Alan G Isaac

3/2/2008 6:07:00 PM

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.





<URL:http://python.org/download/releases/2.6/NE...



- Issue #2025 : Add tuple.count() and tuple.index()

methods to comply with the collections.Sequence API.



Cheers,

Alan Isaac




4 Answers

Paul Boddie

3/2/2008 8:35:00 PM

0

On 2 Mar, 19:06, Alan Isaac <ais...@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/NE...
>
> - 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/is...

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

Paul

Alan G Isaac

3/2/2008 9:05:00 PM

0

Paul Boddie wrote:

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

> http://bugs.python.org/is...

> I think you need to thank Raymond Hettinger for championing the

> cause. ;-)





Yes indeed!

Alan Isaac


Christoph Zwerschke

3/2/2008 9:41:00 PM

0

Paul Boddie schrieb:
> On 2 Mar, 19:06, Alan Isaac <ais...@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.

And nobody stepped up because it had been made very clear by Guido and
others that they don't want tuples to grow methods.

I remember there had been ridiculously excessive threads about this,
this probably being one of many others:
http://groups.google.de/group/comp.lang.python/browse_thread/thread/430a692...

I don't think this was very encouraging for people who wanted to do
something about it.

Anyway, it's good to see this happened now. Thanks to Raymond.

-- Christoph

Roy Smith

3/2/2008 9:52:00 PM

0

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

> On 2 Mar, 19:06, Alan Isaac <ais...@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/NE...
> >
> > - 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/is...
>
> 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!