Raymond Hettinger rcn.com> writes:
>
> [Fred Drake]
> > I'd be happy seeing these methods added to tuple; there's
> > no reason that they would only be useful on mutable sequences.
>
Note that adding index and count to tuple will conflict with using these
names as attributes in classes generat
On Feb 6, 2008 5:21 PM, Aahz <[EMAIL PROTECTED]> wrote:
> On Wed, Feb 06, 2008, Guido van Rossum wrote:
> > On Feb 6, 2008 2:58 PM, Fred Drake <[EMAIL PROTECTED]> wrote:
> >>
> >> I'd be happy seeing these methods added to tuple; there's no reason
> >> that they would only be useful on mutable sequ
On Wed, Feb 06, 2008, Guido van Rossum wrote:
> On Feb 6, 2008 2:58 PM, Fred Drake <[EMAIL PROTECTED]> wrote:
>>
>> I'd be happy seeing these methods added to tuple; there's no reason
>> that they would only be useful on mutable sequences.
>
> Sounds like this is the consensus. Go for it, Raymond
[Fred Drake]
> I'd be happy seeing these methods added to tuple; there's
> no reason that they would only be useful on mutable sequences.
That reminds me, I've always thought Sequence.__contains__().
should always be accompanied by Sequence.index(). Their
use cases are strongly related:
Good n
On Feb 6, 2008 2:58 PM, Fred Drake <[EMAIL PROTECTED]> wrote:
> On Feb 6, 2008 2:29 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> > Do you want to drop those methods from the ABC or add them to tuple?
>
>
> On Feb 6, 2008, at 5:40 PM, Guido van Rossum wrote:
> > I'm not sure, but I'm tempted t
On Feb 6, 2008 2:29 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> Do you want to drop those methods from the ABC or add them to tuple?
On Feb 6, 2008, at 5:40 PM, Guido van Rossum wrote:
> I'm not sure, but I'm tempted to add them to the ABC. What's your
>
Is Guido having a bad typing day?
>> Do you want to drop those methods from the ABC or add them to tuple?
> I'm not sure, but I'm tempted to add them to the ABC.
> What's your hunch?
My hunch is that adding count() and index() to tuple is at
harmless at worst and sometimes helpful at best (I've
occasionally needed them and felt m
On Feb 6, 2008 2:29 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> The tuple class is registered to the collections.Sequence ABC, but it does
> not support count() and index() as required by the ABC.
Good catch!
> Do you want to drop those methods from the ABC or add them to tuple?
I'm not
The tuple class is registered to the collections.Sequence ABC, but it does not
support count() and index() as required by the ABC.
Do you want to drop those methods from the ABC or add them to tuple?
Raymond
___
Python-3000 mailing list
Python-3000@py