Yet another Python textbook

Ian Kelly ian.g.kelly at gmail.com
Wed Nov 21 18:11:15 EST 2012


On Wed, Nov 21, 2012 at 3:58 PM, Dave Angel <d at davea.name> wrote:
> Some don't realize that one very powerful use for the .format style of
> working is that it makes localization much more straightforward.  With
> the curly brace approach, one can translate the format string into
> another language, and if the parameters have to be substituted in
> another order, it's all in one place.

It only matters with positional placeholders, though.  You can achieve
the same thing using named placeholders, which both major formatting
styles support.



More information about the Python-list mailing list