Hi, Snake Tamers
According to http://www.python.org/doc/2.4.1/lib/...q-strings.html (and
next releases):
"""
The conversion types are:
Conversion Meaning Notes
[...]
x Unsigned hexadecimal (lowercase). (2)
X Unsigned hexadecimal (uppercase). (2)
"""
But actually:
Python 2.4.1 (#1, Apr 10 2005, 22:30:36)
[GCC 3.3.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
'-1e240'>>'%x' % -123456
so it is a _signed_ hexadecimal.
However, sometimes it would be convinient to get the unisgned conversion
(especially, since id(..) can return a negative value).
This way is rather clumsy:
'b7b75380'>>'%x' % (id('abcd')+0x100000000)
Do you see any better solution?
p.o.