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 <1351970900.58.0.0409354765513.issue14794@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
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: <1351970900.58.0.0409354765513.issue14794@psf.upfronthosting.co.za>
2012-11-03 19:28:20mark.dickinsonlinkissue14794 messages
2012-11-03 19:28:20mark.dickinsoncreate