[Python-Dev] Unary minus bug
Neil Schemenauer
nas at arctrix.com
Mon Jul 10 00:18:36 CEST 2006
On Sun, Jul 09, 2006 at 03:02:06PM -0700, Neal Norwitz wrote:
> Do we care about this (after your checkin and with my fix to make
> 32-63 bit values ints rather than longs):
>
> # 64 bit box
> >>>minint = str(-sys.maxint - 1)
> >>>minint
> '-9223372036854775808'
> >>>eval(minint)
> -9223372036854775808
> >>>eval('-(%s)' % minint[1:])
> -9223372036854775808L
I don't think we care. Python <= 2.4 has the same behavior (i.e.
adding parens defeats the constant folding since it's done at the
syntax tree level).
Where's your fix regarding 32-63 bit ints? I'm not familiar with
that issue but my recent check-in appears to have broke the 64-bit
buildbots. If no one can explain what's going on there then I guess
I will have to find a login on a 64-bit machine at debug it myself.
Neil
More information about the Python-Dev
mailing list