Indexing list of lists
hildegarde_roth at yahoo.de
Thu Sep 18 20:28:41 CEST 2003
> Numeric (and presumably numarray) can handle arbitrary Python objects.
Oh. I will look at them pronto, then. As for:
> I'd guess it's highly unlikely ever to be part of the standard
> sequence protocol, though.
Passing a slice is passing an abstraction of a sequence (since indexing
a list with a slice returns a list). Given that, it seems hard to justify
not accepting the sequence itself... Passing the abstraction rather than
the thing itself should be an optimization, as in xrange vs. range, left
to the discretion of the programmer.
More information about the Python-list