Message171193
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. |
|
Date |
User |
Action |
Args |
2012-09-24 21:23:17 | mark.dickinson | set | recipients:
+ mark.dickinson |
2012-09-24 21:23:17 | mark.dickinson | set | messageid: <1348521797.77.0.407946912471.issue16030@psf.upfronthosting.co.za> |
2012-09-24 21:23:17 | mark.dickinson | link | issue16030 messages |
2012-09-24 21:23:16 | mark.dickinson | create | |
|