s.index(x[, i[, j]]) will change the s ?
tjreedy at udel.edu
Fri Sep 11 00:42:24 CEST 2009
Chris Rebert wrote:
> On Wed, Sep 9, 2009 at 10:00 PM, s7v7nislands<s7v7nislands at gmail.com> wrote:
>> I known index() does not modify the sequence itself. my question is so
>> why the doc put the index() method in the mutable sequence types list?
Because once upon a time, only lists and not tuples had the method.
> Ah, okay. Now I understand your question. I don't know really. I
> suppose it could just as well go under the more general table for
> "6.6. Sequence Types". I'd guess it's under Mutable Sequence Types for
> convenience's sake since .remove() is mutable-only and makes reference
> to the same footnote. You could file a documentation bug:
I already did.
Producing an edited version of the doc text from my suggestions is on my
todo list if no one beats me to it. I need to learn .rst better, though.
More information about the Python-list