[issue16030] xrange repr broken for large arguments

2012-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bff269ee7288 by Mark Dickinson in branch '2.7':
Issues #16029, #16030: Fix pickling and repr of large xranges.
http://hg.python.org/cpython/rev/bff269ee7288

--
nosy: +python-dev

___
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



[issue16030] xrange repr broken for large arguments

2012-09-28 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
resolution:  - fixed
status: open - closed

___
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



[issue16030] xrange repr broken for large arguments

2012-09-25 Thread Mark Dickinson

Mark Dickinson added the comment:

The patch for issue #16029 fixes this issue, too.

--
components: +Interpreter Core -Library (Lib)
dependencies: +pickle.dumps(xrange(sys.maxsize)) produces xrange(0)

___
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



[issue16030] xrange repr broken for large arguments

2012-09-24 Thread Mark Dickinson

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



[issue16030] xrange repr broken for large arguments

2012-09-24 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

___
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