[Python-Dev] Negated hex/oct constants (SF #660455)

Delaney, Timothy C (Timothy) tdelaney@avaya.com
Thu, 6 Feb 2003 15:50:58 +1100


> From: Tim Peters [mailto:tim_one@email.msn.com]
>=20
> Ooh!  We can't blame this one on the peephole opt, right?  In=20
> current CVS:
>=20
> >>> -int("0xffffffff", 0) # and this does not generate a wng
> 1
> >>> int("-0xffffffff", 0)
> -4294967295L
> >>>
>=20
> As in the tail end of the last msg, the base specifier makes a big
> difference here too:
>=20
> >>> -int("ffffffff", 16)
> -4294967295L
> >>> int("-ffffffff", 16)
> -4294967295L
> >>>

Given all this, I'm +1 on leaving it as it is, and +1 on making it all =
consistent for 2.4 ...

Tim Delaney