New submission from Mark Dickinson: Python 2.7.3+ (2.7:f51d11405f1d+, Sep 24 2012, 21:39:19) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> xrange(0, sys.maxint, sys.maxint-1) xrange(0, -4, 9223372036854775806)
See also issue #16029. There should be a common solution to both these issues. Suggestion is to write a 'range_safe_stop' utility function that returns r->start + r->len * r->step clipped to the range [LONG_MIN, LONG_MAX], and use that for the stop value in both the repr and the pickle. ---------- assignee: mark.dickinson components: Library (Lib) messages: 171193 nosy: mark.dickinson priority: normal severity: normal stage: needs patch status: open title: xrange repr broken for large arguments type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16030> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com