March 11, 2016
8:37 a.m.
STINNER Victor added the comment: I opened the issue when I read this change: https://review.openstack.org/#/c/288224/2/neutron/common/utils.py rndstr = hex(...)[2:] # Whether there is a trailing 'L' is a py2/3 incompatibility rndstr = rndstr.rstrip('L') return rndstr.zfill(length) can be simply written return "{0:0{1}x}".format(..., length) It's less readable, but it's more efficient. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue26506> _______________________________________