[Python-Dev] PEP for adding an sq_index slot so that any object, a or b, can be used in X[a:b] notation

Terry Reedy tjreedy at udel.edu
Fri Feb 10 06:07:37 CET 2006


>   Add a nb_index slot to PyNumberMethods, and a corresponding
>   __index__ special method.  Objects could define a function to
>   place in the sq_index slot that returns an appropriate

I presume 'sq_index' should also be 'nb_index' 





More information about the Python-Dev mailing list