Guido disabled the list(xrange(sys.maxint / 4)) test
for 64-bit machines because PySequence_Length returns
an int and not ssize_t.
The test needs not be disabled; for the time being, it
should be
list(xrange(min(sys.maxint / 4, 0x1fffffff)))
There is another flaw, btw.
I ran the test on a 512MB RAM 64bit machine, and it passed.
However, when I ran it on a 16GB RAM 64bit machine, it
raised TestFailed incorrectly(!), because the statement
did not produce a MemoryError... I think this is
probably the only occasion the 'else' part was ever
evaluated (but ICBW :)
I did not supply a patch, because I didn't want to mess
with Guido's comments.
<HUMOUR>
Perhaps the test should be just:
try:
list(xrange(min(sys.maxint / 4, 0x1fffffff)
except MemoryError:
pass
else:
print "I wish this passed in my home machine too..."
</HUMOUR>
|