[Python-Dev] Replacement for print in Python 3.0 (original) (raw)
Guido van Rossum guido at python.org
Tue Sep 6 16:15:23 CEST 2005
- Previous message: [Python-Dev] string.Template format enhancements (Re: Replacement for print in Python 3.0)
- Next message: [Python-Dev] Replacement for print in Python 3.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 9/5/05, tanzer at swing.co.at <tanzer at swing.co.at> wrote:
Positional arguments remove too much meaning from the template.
Compare: '$user forgot to frobnicate the $file!\n' with '$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).
The operative word being whenever. You're thinking of the i18n use case, where the format string is separated from the arguments. I'm thinking of the non-i18n use case, where the format isalmost always a string literal adjacent to the arguments. I'm not at all convinced that we should attempt to find a solution that handles both use cases; most Python code never needs i18n.
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] string.Template format enhancements (Re: Replacement for print in Python 3.0)
- Next message: [Python-Dev] Replacement for print in Python 3.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]