This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients mark.dickinson
Date 2012-09-24.21:23:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348521797.77.0.407946912471.issue16030@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-09-24 21:23:17mark.dickinsonsetrecipients: + mark.dickinson
2012-09-24 21:23:17mark.dickinsonsetmessageid: <1348521797.77.0.407946912471.issue16030@psf.upfronthosting.co.za>
2012-09-24 21:23:17mark.dickinsonlinkissue16030 messages
2012-09-24 21:23:16mark.dickinsoncreate