This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients Manvi B, docs@python, eric.smith, ezio.melotti, serhiy.storchaka, vstinner, wolma
Date 2016-03-21.11:11:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1458558695.04.0.919398840856.issue26506@psf.upfronthosting.co.za>
In-reply-to
Content
> Note: Ezio, do you prefer format(value, 'x') for '{:x}'.format(value)?

While formatting a single value the former is better/shorter, but the latter is perhaps more common since you usually have something else in the string too.

The latter can also be used to do something like:
>>> '{num:x} {num:X} {num:#x} {num:#X}'.format(num=255)
'ff FF 0xff 0XFF'
History
Date User Action Args
2016-03-21 11:11:35ezio.melottisetrecipients: + ezio.melotti, vstinner, eric.smith, docs@python, serhiy.storchaka, wolma, Manvi B
2016-03-21 11:11:35ezio.melottisetmessageid: <1458558695.04.0.919398840856.issue26506@psf.upfronthosting.co.za>
2016-03-21 11:11:35ezio.melottilinkissue26506 messages
2016-03-21 11:11:34ezio.melotticreate