Message174678
I should note that this patch fixes/changes one other aspect of slice.indices: namely that it used to accept a negative length, and return essentially meaningless results in that case:
>>> slice(0, 10, 1).indices(-3)
(-3, -3, 1)
With the patch, it now raises ValueError if given a negative length:
>>> slice(0, 10, 1).indices(-3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: length should not be negative |
|
Date |
User |
Action |
Args |
2012-11-03 19:28:20 | mark.dickinson | set | recipients:
+ mark.dickinson, ned.deily, eric.araujo, hynek, Paul.Upchurch, serhiy.storchaka |
2012-11-03 19:28:20 | mark.dickinson | set | messageid: <1351970900.58.0.0409354765513.issue14794@psf.upfronthosting.co.za> |
2012-11-03 19:28:20 | mark.dickinson | link | issue14794 messages |
2012-11-03 19:28:20 | mark.dickinson | create | |
|