Mark Dickinson <dicki...@gmail.com> added the comment: Nice catch! Thanks for reporting this.
get_len_of_range in Objects/rangeobject.c only works for positive steps, but is being called with a negative step here. I think get_len_of_range should be changed to work with both positive and negative steps. It's only called from one other place, and that place also has to deal with negative steps. (And I'm not convinced that this place is dealing with negative steps correctly either: it uses simply -step to negate the step, which can overflow if step == LONG_MIN.) I'll put a patch together. ---------- assignee: -> mark.dickinson keywords: +easy nosy: +mark.dickinson priority: -> critical versions: +Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7298> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com