Python 2.3.2 (#2, Oct 6 2003, 08:02:06)
Ugh! When was the last time you wanted a signed hexadecimal output?
And why is hex() of a long in uppercase, while hex()
of an int is lowercase?
>>> hex(-1) __main__:1: FutureWarning: hex()/oct() of negative int will return a signed string in Python 2.4 and up '0xffffffff' >>> hex(-1L) '-0x1L' >>> hex(0xffffffffL) '0xFFFFFFFFL' |