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-04.11:00:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1352026846.8.0.0382780401053.issue14794@psf.upfronthosting.co.za>
In-reply-to
Content
New patch that fixes the error message for badly typed slice arguments.

Also tweaks a couple of other details:

 - replace Py_GE with Py_GT, Py_LE with Py_LT in the out-of-range comparisons, as suggested by Serhiy;  this also makes it more closely match the Python reference implementation (since max(x, y) and min(x, y) both return x when x and y are equal)

 - make sure exception messages match between the Python reference implementation and the C version.

> Look at compute_slice_indices() in Objects/rangeobject.c.

Will do.  I'm not quite sure I even understand how that code's managing to work at the moment:  I see the Py_ssize_t case, but I don't see the fallback code for the case when things are too large for a Py_ssize_t.
History
Date User Action Args
2012-11-04 11:00:46mark.dickinsonsetrecipients: + mark.dickinson, ned.deily, eric.araujo, hynek, Paul.Upchurch, serhiy.storchaka
2012-11-04 11:00:46mark.dickinsonsetmessageid: <1352026846.8.0.0382780401053.issue14794@psf.upfronthosting.co.za>
2012-11-04 11:00:46mark.dickinsonlinkissue14794 messages
2012-11-04 11:00:46mark.dickinsoncreate