<div class="gmail_quote">On Fri, Apr 25, 2008 at 12:04 AM, Nick Coghlan <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d"><br></div>
Eh, brain explosion from typing too late at night. The experiment I actually *meant* to try was:<br>
<br>
>>> x = range(0, 2**33, 2)<br>
>>> len(x)<div class="Ih2E3d"><br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br></div><div class="Ih2E3d">
OverflowError: Python int too large to convert to C ssize_t<br></div><div class="Ih2E3d">
>>> x[0]<br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br></div><div class="Ih2E3d">
OverflowError: Python int too large to convert to C ssize_t<br>
<br>
<br></div>
The error message in the latter case is thoroughly confusing (although it is now clearer what is causing it).<br></blockquote><div><br></div><div>Agreed. See also the discussion over at</div><div><br></div><div><a href="http://bugs.python.org/issue2690">http://bugs.python.org/issue2690</a><br>
</div><div> </div><div>Mark</div></div>