[Python-Dev] Re: PEP 292, Simpler String Substitutions

Paul Prescod paul@prescod.net
Sun, 23 Jun 2002 11:32:21 -0700


Christian Tismer wrote:
> 
>...
> 
> Ok, I'm all with it.
> Since a couple of hours, I'm riding the following horse:
> 
> - $name, $(name), $(any expr)  is just fine
> - all of this is compile-time stuff
> ....

I think you just described PEP 215. But what you're missing is that we
need a compile time facility for its flexibility and simplicity but we
also need a runtime facility to allow I18N.

> I also believe it is a good idea to do the _() on
> the unexpanded string (as shown), since the submitted
> values are most probably hard to translate at all.

_ runs at runtime. If the interpolation is done at compile time then "_"
is executed too late.

 Paul Prescod