__getitem__ and slices

Alex Martelli aleax at aleax.it
Wed Jan 29 17:52:10 EST 2003


Daniel Silva wrote:
   ...
> It was my understanding that primary[start:stop] would be translated into
> primary.__getitem__(slice(start,stop)).  Either the List __getitem__
> method or the documentation for sequences seems incorrect.

The former -- up to Python 2.2; fixed in Python 2.3.


Alex





More information about the Python-list mailing list