[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread Eryk Sun
Eryk Sun added the comment: > No, I meant to write xrange(). My point is there is no crasher > if this change didn't occur. Oh, by 'still functions' you meant that it doesn't cause an access violation that crashes the process, as opposed to raising an OverflowError that can be handled. -

[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread Brett Cannon
Brett Cannon added the comment: No, I meant to write xrange(). My point is there is no crasher if this change didn't occur. -- ___ Python tracker ___ ___

[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread Eryk Sun
Eryk Sun added the comment: > xrange() still functions if you give it a value larger than `long` What do you mean? Did you mean to write range() instead of xrange()? Both range and xrange in Python 2 use a C long for the start, stop, step, and length values. With how they get used this general

[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread Brett Cannon
Brett Cannon added the comment: I agree that it's a new feature since xrange() still functions if you give it a value larger than `long` (right?) and there's nothing saying it has to support the full size of an index. -- nosy: +brett.cannon ___ Pyth

[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread Mark Dickinson
Mark Dickinson added the comment: I hate to say it, but I think this would count as an enhancement rather than a bugfix: there's nothing documented about the range of `xrange`. -- ___ Python tracker __

[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread STINNER Victor
STINNER Victor added the comment: > (e.g on 64-bit Windows) Platforms with sizeof(long) < sizeof(size_t), I only know one platform: Windows 64-bit. Since this change only impacts Windows 64-bit, we must compile (to check for compilation warnings) and run tests with this patch on Windows 64-bi