
14 Oct
2011
14 Oct
'11
8:16 p.m.
Guido van Rossum schrieb am Fr, 14. Okt 2011, um 10:23:10 -0700:
- add slicing such that it normalizes .stop to .start + the right
multiple of .step
That's what slicing already does now. This kind of normalisation still isn't enough to get an implementation of the sequence-based definition of equality, though. We would also need to set the step value to 1 in case the range has length 0 or 1. (Not that I'd propose to do the latter -- I mention it just to make clear that the steps you suggest don't allow for comparison of ranges as sequences in any easier way than currently possible.)
Cheers, Sven