[Tutor] OverflowError: cannot fit 'long' into an index-sized integer
eryksun
eryksun at gmail.com
Tue Jan 7 11:58:58 CET 2014
On Tue, Jan 7, 2014 at 4:49 AM, Jorge L. <dalveen at gmail.com> wrote:
>
> When i test that script against 600851475143 I get the following error
You're trying to create a list with over 600 billion items.
sys.maxsize is a bit over 2 billion for 32-bit CPython, but switching
to 64-bit won't help unless you have a few terabytes of memory (8
bytes per pointer). You need to rethink your approach to generating
primes.
More information about the Tutor
mailing list