Re: [Tutor] Long list error

2009-03-09 Thread Alan Gauld
"William Stephens" wrote I was working on a sieve of eratosthenes and ran into an error I don't understand. >>> size = 100 >>> l = [0,1]*(size/2) OverflowError: cannot fit 'long' into an index-sized integer Is there a type or something that I can do to prevent this error? The prob

Re: [Tutor] Long list error

2009-03-08 Thread Kent Johnson
On Sun, Mar 8, 2009 at 8:27 PM, William Stephens wrote: > Hello, > > I was working on a sieve of eratosthenes and ran into an error I don't > understand. > size = 10 000 000 000 l = [0,1]*(size/2) > Traceback (most recent call last): >  File "", line 1, in > OverflowError: cannot fit 'l

[Tutor] Long list error

2009-03-08 Thread William Stephens
Hello, I was working on a sieve of eratosthenes and ran into an error I don't understand. >>> size = 100 >>> l = [0,1]*(size/2) Traceback (most recent call last): File "", line 1, in OverflowError: cannot fit 'long' into an index-sized integer Is there a type or something that I ca