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 belopolsky, mark.dickinson
Date 2008-04-25.18:47:57
SpamBayes Score 0.019502955
Marked as misclassified No
Message-id <1209149282.65.0.442237787445.issue2690@psf.upfronthosting.co.za>
In-reply-to
Content
I guess there needs to be a decision on whether to make range objects of 
length >= PY_SSIZE_T_MAX illegal; perhaps more discussion on python-dev 
would be worthwhile?

I can see three options, besides leaving things as they are:

(1) make large ranges illegal, as with this patch
(2) make large ranges legal, but don't allow indexing with indices
larger than PY_SSIZE_T_MAX.
(3) allow large ranges *and* large indices.

Option 3 seems to me like the ideal from the users' point of view, but I'm 
not sure whether it's easy/possible to implement it given that sq_item 
receives a Py_ssize_t for the index.

Option 2 seems messy:  half of one thing and half of the other, but I 
think it would be easy to implement.  This is what I'd personally prefer 
if Option 3 isn't feasible.

If Option 1 is indeed the preferred option, then the patch looks good to 
me, and works for me on OS X 10.5.  (Minor nitpick: it introduces some 
extra tab characters.)

Whatever happens, we probably also need a documentation update explaining 
the limitations on range.
History
Date User Action Args
2008-04-25 18:48:03mark.dickinsonsetspambayes_score: 0.019503 -> 0.019502955
recipients: + mark.dickinson, belopolsky
2008-04-25 18:48:02mark.dickinsonsetspambayes_score: 0.019503 -> 0.019503
messageid: <1209149282.65.0.442237787445.issue2690@psf.upfronthosting.co.za>
2008-04-25 18:48:01mark.dickinsonlinkissue2690 messages
2008-04-25 18:47:59mark.dickinsoncreate