[Python-3000] Please don't kill the % operator...

"Martin v. Löwis" martin at v.loewis.de
Fri Aug 17 00:35:39 CEST 2007


>    * the new is more verbose than the old
>    * the curly braces and [012]: prefixes are just syntactic sugar when
>      converting old to new
>    * in situations where the format string isn't a literal that mechanical
>      translation from old to new won't be possible
>    * lots of people are familiar with the old format, few with the new

I think most of these points are irrelevant. The curly braces are not
just syntactic sugar, at least the opening brace is not; the digit
is not syntactic sugar in the case of message translations.

That lots of people are familiar with the old format and only few are
with the new is merely a matter of time. As Guido van Rossum says:
the number of Python programs yet to be written is hopefully larger
than the number of programs already written (or else continuing the
Python development is futile).

That the new format is more verbose than the old one is true, but only
slightly so - typing .format is actually easier for me than typing
% (which requires a shift key).

Porting programs that have computed format strings is indeed a
challenge. The theory here is that this affects only few programs.

Regards,
Martin


More information about the Python-3000 mailing list