This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients Paul.Upchurch, eric.araujo, hynek, mark.dickinson, ned.deily, serhiy.storchaka
Date 2012-11-03.19:28:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:20mark.dickinsonsetrecipients: + mark.dickinson, ned.deily, eric.araujo, hynek, Paul.Upchurch, serhiy.storchaka
2012-11-03 19:28:20mark.dickinsonsetmessageid: <>
2012-11-03 19:28:20mark.dickinsonlinkissue14794 messages
2012-11-03 19:28:20mark.dickinsoncreate