Misleading description of [i:j:k] slicing?

Raoul Gough RaoulGough at yahoo.co.uk
Thu Aug 21 14:07:33 EDT 2003


Michael Hudson <mwh at python.net> writes:

> Raoul Gough <RaoulGough at yahoo.co.uk> writes:
>> Seems to me that "0 <= n < abs(i-j)" is wrong, since the range of n
>> gets multiplied by k. 
>
> How about "0 <= n < abs(k*(i-j))"?  But you're right, what's there is
> a bit wrong.  It's surprisingly hard to get this written down well.
> The idea's not that hard, but a terse explanation is surprisingly
> hard (when you start omitting values it gets even more fun!).
>
> Please submit a patch (assign it to me if you like -- the above
> passage is my fault).

I've submitted a bug to the sourceforge tracker for Python, but
couldn't see how to assign it to anyone. Bug number is 792656, hope
this is what you meant.

-- 
Raoul Gough
"Let there be one measure for wine throughout our kingdom, and one
measure for ale, and one measure for corn" - Magna Carta




More information about the Python-list mailing list