[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Life with PyGame



On Mon, Feb 18, 2002 at 08:58:25PM +0100, Nicola Larosa wrote:
> > Traceback (most recent call last):
> >   File "pygalife.py", line 123, in ?
> >     main()
> >   File "pygalife.py", line 112, in main
> >     white = 2 ** screen.get_bitsize() - 1
> > OverflowError: integer exponentiation
> 
> Mmm, I suspected something like this could happen when the bit depth of the 
> display is 32 bit. Unfortunately I don't have it on my laptop.
> 
> Is your display bit depth set at 32 bits? Does anyone know how to avoid that 
> error while computing 2**31 or 2**32?

I'm guessing there's no reason not to make it a long, like "2L**32".

-- 
Dan Stromberg                                               UCI/NACS/DCS

PGP signature