<[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Many people I know ask why Python does slicing the way it does.....
>
> Can anyone /please/ give me a good defense/justification???
>
> I'm referring to why mystring[:4] gives me
> elements 0, 1, 2 and 3 but *NOT* mystring[4] (5th element).
>
> Many people don't like idea that 5th element is not invited.
>
> (BTW, yes I'm aware of the explanation where slicing
> is shown to involve slices _between_ elements.  This
> doesn't explain why this is *best* way to do it.)

Recently there was a short (sub)thread about that.
One of my messages (against half-open slices) is,
for example

http://groups-beta.google.com/group/comp.lang.python/msg/5532dd50b57853b1

Javier

___________________________________________________________
Javier Bezos                | TeX y tipografía
jbezos at wanadoo dot es    | http://perso.wanadoo.es/jbezos
............................|...............................
CervanTeX (Spanish TUG)     | http://www.cervantex.org







-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to