New submission from Serhiy Storchaka:

The xrange() object works with integers in the range of C long, not Py_ssize_t. 
Thus the idiomatic expression xrange(len(seq)) can fail for real sequences if 
sys.maxint < sys.maxsize (e.g on 64-bit Windows).

Proposed patch changes the xrange() implementation to use Py_ssize_t instead of 
C long.

----------
components: Interpreter Core
files: xrange_py_ssize_t.patch
keywords: patch
messages: 260816
nosy: benjamin.peterson, haypo, mark.dickinson, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: The range for xrange() is too narrow
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file42022/xrange_py_ssize_t.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26428>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to