tuple.index()

Fredrik Lundh fredrik at pythonware.com
Thu Dec 14 10:50:02 EST 2006


Nick Maclaren wrote:

> The point is that an index method makes sense on ANY data structure that
> can be subscripted by an integer value but, for reasons that aren't at
> all clear, is not defined for Python tuples.  There is no technical or
> mathematical reason why it shouldn't be.

so where would you put such an "index" implementation so it would work on
ANY data structure that can be subscripted by an integer value ?

</F> 






More information about the Python-list mailing list