Rationale behind the deprecation of __getslice__?

Nick Coghlan ncoghlan at iinet.net.au
Fri Dec 10 12:50:26 CET 2004

Steven Bethard wrote:
> Presumably the numarray code has to do quite a bit of type checking to 
> perform all these slicings right (and I didn't even show you what 
> happens when you use another array as an "index").  I'm not necessarily 
> saying that all this type checking is a good thing, but because people 
> will always find new things that they want to index by, adding 
> __getxxx__ methods for each of the index types is probably not the right 
> road to go down...

I suspect Steve's hit the nail on the head here - the requirements of the numpy 
folks certainly drove the development of extended slicing in the first place (it 
wasn't until 2.3 that Python's builtin sequences supported extended slicing at all).


Nick Coghlan   |   ncoghlan at email.com   |   Brisbane, Australia

More information about the Python-list mailing list