A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-March/077571.html below:

[Python-Dev] Why .index() is not a method of all sequence types ?

[Python-Dev] Why .index() is not a method of all sequence types ? [Python-Dev] Why .index() is not a method of all sequence types ?Terry Reedy tjreedy at udel.edu
Thu Mar 13 02:26:31 CET 2008
"Joost Behrends" <webmaster at h-labahn.de> wrote in message 
news:20080313010923.d1bc7ee9.webmaster at h-labahn.de...
| With such a tuple tp i tried 'ix = tp.index(...)' recently and was
| astonished to learn, that this doesn't work. Since we have '... in tp'
| for me it seems, that it should make very little difference in
| the interpreter's code, if .index() would be a method of any sequence,
| mutable or not. Such a small difference, that this minor change wouldn't
| deserve a PEP.

I believe .index() is part of the 3.0 sequence protocol and hence has been 
added to tuples for 3.0.  Don't know if has been or will be backported to 
2.6. 



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4