[Python-Dev] Replacement for print in Python 3.0
tanzer at swing.co.at
Tue Sep 6 08:33:31 CEST 2005
Guido van Rossum <guido at python.org> wrote:
> What do you think of the trick (that I wasn't aware of before)
> used in Java and .net of putting an optional position specifier
> in the format, and using positional arguments? It would be a
> little less verbose and with sensible defaults wouldn't quite
> punish everybody as much for the needs of i18n. Formats with more
> than 3 or 4 variables should be rare in any case (these are not
> the days of Fortran formatted output).
Positional arguments remove too much meaning from the template.
'$user forgot to frobnicate the $file!\n'
'$1 forgot to frobnicate the $2!\n'
Whenever the template definition and its use are not directly
adjacent, the template is that much harder to understand (i.e.,
in the context of translation, one wouldn't see the arguments
passed to the template).
Christian Tanzer http://www.c-tanzer.at/
More information about the Python-Dev