Mark Dickinson <[EMAIL PROTECTED]> added the comment: 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. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2690> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com