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 ncoghlan
Recipients Arfrever, arjennienhuis, barry, benjamin.peterson, brett.cannon, christian.heimes, durin42, ecir.hana, eric.smith, exarkun, ezio.melotti, flox, glyph, gregory.p.smith, loewis, martin.panter, ncoghlan,, pitrou, serhiy.storchaka, stendec, terry.reedy, tshepang, uau, underrun, vstinner
Date 2016-06-10.22:00:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The core problem with the idea of adding bytes.format to Python 3 is that the real power of str.format actually lies in the extensible __format__ protocol and the associated format() builtin, as those rely heavily on text-specific assumptions.

I interpreted Amber's comments at the language summit as referring more to our changing tune regarding mod formatting from:

- mod formatting is deprecated, use brace formatting instead; to
- they're both fully supported, neither is deprecated; to
- use brace formatting for text data, mod formatting for binary data

Folks that followed our original "stop using mod formatting" guidance thus needed to change course when it became our recommended technique for formatting binary data.

Since we now know format() and __format__ aren't suitable for binary data (PEP 361 originally included it, and it got dropped as we kept finding awkward corner cases), that means any new binary formatting proposal needs to explain:

- how it compares to existing serialisation techniques (mod-formatting, the struct module, text-formatting+encoding, etc)
- why it needs to be a builtin method or function rather than a new serialisation module
Date User Action Args
2016-06-10 22:00:09ncoghlansetrecipients: + ncoghlan, loewis, barry, brett.cannon, terry.reedy, gregory.p.smith, exarkun, pitrou, vstinner, eric.smith, christian.heimes, benjamin.peterson, glyph, ezio.melotti, durin42, Arfrever, arjennienhuis, flox, ecir.hana, uau, tshepang, underrun, martin.panter, serhiy.storchaka,, stendec
2016-06-10 22:00:08ncoghlansetmessageid: <>
2016-06-10 22:00:08ncoghlanlinkissue3982 messages
2016-06-10 22:00:08ncoghlancreate