integer overflow

Chad Haynes haynesc at rockefeller.edu
Thu Feb 5 17:44:48 CET 2004


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

> 
> Cheers,
> mwh
> 



More information about the Python-list mailing list