Immutable sequence types lacking index() method

From: Anne Wangnick (anne.wangnick_at_t-online.de)
Date: 08/31/04


To: <python-list@python.org>
Date: Tue, 31 Aug 2004 21:13:00 +0200

Dear all,

I don't get why the index() method is only defined for mutable sequence
types. This is not what I expected. Shouldn't this be added in Python? Is
there such a PEP already?

Regards,
Sebastian Wangnick



Relevant Pages

  • Re: sync dirs
    ... I've used that several times with great satisfaction, and it's fairly low-end - all you need is an FTP server at the other end. ... installer (or, at least, I have it somehow in my Windows Python 2.4, but ... not in my Cygwin Python 2.4. ...
    (comp.lang.python)
  • Re: Interpreter problem
    ... Of course you could just read and write the file in Python in text mode, that might get rid of the returns. ... There's probably a vim mode you can set to display the extraneous characters - it normally screams "^M" at me for files with carriage returns in them. ...
    (comp.lang.python)
  • Re: Success Natively Compiling Python-2.3.4 in Mingw?
    ... > Regards, Fernando ... Hello Fernando, ... check out the pyMinGW patch here: ... Python compiled under MinGW. ...
    (comp.lang.python)
  • Re: is this data structure build-in or Ill have to write my own class?
    ... assert dict.items==a ... structure of Python. ... - maintain the order (for iter and print) ...
    (comp.lang.python)
  • Re: goto
    ... > what is the equivalent of C languages' goto statement in python? ... > best regards ... And here is a Python equivalent using exception handling: ...
    (comp.lang.python)