Pep 3101 provides the rationale for finally replacing the % operator with the format method. This question and the accepted answer dwell on the same points.
I could not find, however, the rationale for the new syntax, and I do not understand the benefits of this change. Pep 3101 lists various alternative syntaxes that also include the famous printf format specifier style, as specified in the C99 standard, and its variants. (For an example with documentation, go here to section 7.19.6.1 "The fprintf Function" on pages 274ff).
For the new string.format() method, the use of the same format specification language used by the % operator was considered.
What can be done with the new syntax that could not be executed with the old?
Edit: parameter reordering could also be added to the old syntax just as it was added to the ANSI C standard. View the latest man sprintf
cfi
source share