[Python-Dev] PEP 292, Simpler String Substitutions

Oren Tirosh oren-py-d@hishome.net
Sat, 22 Jun 2002 13:44:59 +0300


On Thu, Jun 20, 2002 at 03:48:52PM -0700, Ka-Ping Yee wrote:
> Using compile-time parsing, as in PEP 215, has the advantage that it
> avoids any possible security problems; but it also eliminates the
> possibility of using this for internationalization.  

Compile-time parsing may eliminate the possibility of using the same 
mechanism for internationalization, but not the possibility of using the
same syntax. A module may provide a function that interprets the same 
notation at runtime.  The runtime version probably shouldn't support full 
expression embedding - just simple name substitution.

> I see this as the key tension in the string interpolation issue (aside 
> from all the syntax stuff -- which is naturally controversial).

And the security vs. ease-of-use issue.

	Oren