Mark Dickinson <dicki...@gmail.com> added the comment: The length calculation in range_iter in Objects/rangeobject.c is incorrect, when using a longrangeiterobject. The length is computed as: (stop - start)//step. It should be ceiling((stop-start)/step), or 1 + (stop - start - 1)//step, provided that start <= stop and step > 0. It's not clear to me right now whether there may also be problems with negative steps, and with cases where start < stop, etc.
I think this is serious enough to be considered a release blocker for 3.1; I'm working on a patch, and will post it later today. ---------- assignee: -> marketdickinson nosy: +rhettinger priority: -> release blocker _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6334> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com