On Fri, 14 Mar 2008 16:00:07 +0100
Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> The %x conversion specifier is documented in
> http://docs.python.org/lib/typesseq-strings.html as "Unsigned
> hexadecimal (lowercase)."  What does "unsigned" refer to?
> 
> >>> '0x%x' % 10
> '0xa'
> >>> '0x%x' % -10
> '0x-a'
> 
> Is this a bug or is %x misdocumented?

I think it is working exactly as documented.  It says that it displays
unsigned numbers.  If you give it a negative number you get undefined
behaviour.  Are you saying that the docs could be a little clearer?

-- 
D'Arcy J.M. Cain <[EMAIL PROTECTED]>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to