Changing case in hex output

Paul Watson pwatson at redlinec.com
Sun Feb 1 10:30:13 EST 2004


Why does the case of the hex output change between short and long values?

Python 2.1 (#1, May 23 2003, 11:43:56) [C] on aix4
Type "copyright", "credits" or "license" for more information.
>>> print hex(170)
0xaa
>>> print hex(170L)
0xAAL


Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print hex(170)
0xaa
>>> print hex(170L)
0xAAL





More information about the Python-list mailing list