March 10, 2016
11:21 a.m.
STINNER Victor added the comment:
I regulary see Python code using hex(value)[2:]
In fact, it's even worse, I also saw Python 2 code stripping trailing "L", since hex(long) adds a L suffix... $ python2 Python 2.7.10 (default, Sep 8 2015, 17:20:17) [GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux2
hex(123L) '0x7bL' "%x" % 123L '7b' format(123L, "x") '7b' "%#x" % 123L '0x7b' format(123L, "#x") '0x7b'
---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue26506> _______________________________________