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 mrh1997
Recipients Arfrever, Christian H, barry, belopolsky, eric.smith, gotgenes, gregory.p.smith, mrh1997, ncoghlan, vstinner
Date 2017-05-03.09:54:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493805267.43.0.316011621192.issue22385@psf.upfronthosting.co.za>
In-reply-to
Content
regarding the proposal for mini format languages for bytes (msg292663):
Wouldn't it be more consistent if the format specifiers are identical to the one of int's (see https://docs.python.org/3/library/string.html#format-specification-mini-language).

I.e. "X" / "x" for hex, "o" for octal, "d" for decimal, "b" for binary, "c" for character (=default). Only 'A' need to be added for printing only ascii characters.

Furthermore I cannot see in how far the format spec in http://bugs.python.org/issue22385#msg292663 ("h#,1") is more intuitive than in http://bugs.python.org/issue22385#msg226733 ("#,.4x"), which looks like the existing minilang.

Why does Python need a new format mini lang, if the existing one provides most of the requirements. As developer it is already hard to memorize the details of the existing minilang. Ideally I do not need to learn a similar but different one for bytes...
History
Date User Action Args
2017-05-03 09:54:27mrh1997setrecipients: + mrh1997, barry, gregory.p.smith, ncoghlan, belopolsky, vstinner, eric.smith, gotgenes, Arfrever, Christian H
2017-05-03 09:54:27mrh1997setmessageid: <1493805267.43.0.316011621192.issue22385@psf.upfronthosting.co.za>
2017-05-03 09:54:27mrh1997linkissue22385 messages
2017-05-03 09:54:27mrh1997create