integer overflow

Michael Hudson mwh at python.net
Thu Feb 5 11:55:22 EST 2004


Chad Haynes <haynesc at rockefeller.edu> writes:

> Michael Hudson wrote:
> 
> > Chad Haynes <haynesc at rockefeller.edu> writes:
> > 
> >>I got an odd error which I cannot explain and cannot seem to reproduce.
> >>The following statement
> >>
> >>	lst[0] = num
> >>
> >>produced this error
> >>
> >>	OverflowError: unsigned short is greater than maximum
> >>
> >>The number was around 65536 so it makes sense that it would overflow a
> >>short, but why is it trying to force it into a short integer?
> > Is lst an array.array('h') or something (numarray...)?
> 
> Nope, its just a regular list

Code, please.

Cheers,
mwh

-- 
  The snakes are optional, as are the electrodes, the molten lead
  and the ritual buggering by syphilitic warthogs. 
                                        -- Tanuki the Raccoon-dog, asr



More information about the Python-list mailing list