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 <[email protected]>
<http://bugs.python.org/issue26506>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com