A python problem about int to long promotion just see the idle session

Fredrik Lundh fredrik at pythonware.com
Wed May 3 13:26:18 EDT 2006


"gen_tricomi" <ogahejini at yahoo.com> wrote:

> IDLE 1.1.2
> >>> import sys
> >>> save_maxint = sys.maxint
> >>> save_maxint
> 2147483647
> >>> save_maxint += 1
> >>> save_maxint
> 2147483648L
> >>> save_maxint - 1
> 2147483647L
> >>> save_maxint + 1
> 2147483649L
> >>> save_maxint - 1
> 2147483647L
> >>> save_maxint + 1
> 2147483649L
> >>> save_maxint - 1
> 2147483647L
> >>> save_maxint + 1
> 2147483649L
>
>
> from the above you can see what int to long promotion is causing
> i dont need to say much please see for yourself.

?

</F>






More information about the Python-list mailing list