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

Michael Hudson mwh@python.net
Thu, 06 Feb 2003 11:33:23 +0000


Guido van Rossum <guido@python.org> writes:

>> >>>>> "GvR" == Guido van Rossum <guido@python.org> writes:
>> 
>>     GvR> The bad thing is that this bug is already in all versions of
>>     GvR> Python 2.2, as well as in Python 2.3a1.
>> 
>> So how did you find it?  Was a bug report or random noodling?  Was
>> someone actually bit by it?  I'm curious but I don't have a
>> recommendation since I'd never write something like this (hex
>> constants always seem unsigned to me).
>> 
>> -Barry
>
> I don't recall how I found it -- I think someone mentioned it to me.

Theres an -020000000000000000000000000000000000 in test_grammar[1].
Given this thread, I'm rather unclear what it's testing.  The compiler
module compiles it differently to the builtin compiler.

Cheers,
M.

[1] I may not have got the number of zeros correct :)

-- 
  MARVIN:  Oh dear, I think you'll find reality's on the blink again.
                   -- The Hitch-Hikers Guide to the Galaxy, Episode 12