[Pyrex] Basic Pyrex question

Lenard Lindstrom len-l at telus.net
Sat May 17 04:04:54 CEST 2008


Yes, the merging of Python's int and long types has been going on for 
awhile. When a 32 bit int overflows the result is automatically promoted 
to an unlimited size long. The merger has reached completion in Python 
3.0 where the int type has disappeared altogether.

-- 
Lenard Lindstrom
<len-l at telus.net>


Matt Hammond wrote:
> To the best of my knowledge, on most common 32bit processor  
> architectures/environments/compilers these days, a long and int are both  
> the same size - 32bits (both wrap at just over +2000000000)
>
> I believe python's built in integer support these days automatically  
> transparently starts using a data type capable of handling larger values  
> when the value reaches the threshold of needing it - hence the first of  
> your two examples still works.
>
>
>
>   




More information about the Pyrex mailing list