Viorel Preoteasa asked on python-help today about supporting slices with non-integer indexes, e.g.: foo['a':'abc'] = some_sequence Currently the Python interpreter (in the slice_index function of ceval.c) enforces integer slice indices. I won't pretend to provide motivation for non-integral slice indices. Instead, I've CC'd Viorel and will let him chime in if he feels the need. It does seem to me that if the __setslice__ programmer is willing to do the type checking and provide the semantics of "from X to Y" for aribtrary X and Y that the interpreter should let non-integer indices pass. Skip Montanaro | http://www.mojam.com/ skip@mojam.com | http://www.musi-cal.com/ "Languages that change by catering to the tastes of non-users tend not to do so well." - Doug Landauer
participants (6)
-
Barry A. Warsaw
-
bckfnnïĵ worldonline.dk
-
Christian Tismer
-
Greg Stein
-
Skip Montanaro
-
Viorel Preoteasa