On Tue, Sep 8, 2015 at 7:00 AM, Andrew Barnert via Python-ideas wrote:
But there will always be cases that % is better for, such as:

* sharing a table of format strings with code in C or another language
* simple formats that need to be done fast in a loop
* formatting strings to use as str.format format strings
* messages that you've converted from logging to real output
* ASCII-based wire protocols or file formats

Supporting this last one is PEP 461. There are no proposals on the
cards to add a b"...".format() method (it's not out of the question,
but there are problems to be overcome because of the extreme
generality of it), yet we have percent formatting for bytestrings. I
think that's a strong indication that percent formatting is fully
supported and will be for the future.


Search Discussions

Discussion Posts


Follow ups

Related Discussions



site design / logo © 2018 Grokbase