[Python-Dev] PEP 216 (string interpolation) alternative EvalDict

Steven Majewski sdm7g@Virginia.EDU
Mon, 14 Jan 2002 21:15:34 -0500 (EST)


On Mon, 14 Jan 2002, Paul Prescod wrote:
> ...
> then realize that is getting confusing so you switch to dictionary
> arguments and then that gets unweildy because you're just declaring new
> names for existing variables so you use vars(). But then you want to
> interpolate the result of a function call or expression. So you have to
> set up a one-time-use variable.
>
> PEP 215 (which I did not write!) unifies all of the use cases into one
> syntax that can be taught in ten minutes. The % syntax is fine for
> totally different use cases: printf-style formatting and interpolation
> of strings that might be generated at runtime.

But Jason just said that function calls are not allowed.
( We -- actually, he listed what was allowed, and function calls
  were definitely not among them. )

PEP 215's examples don't agree with the limitations in it's
security section, and the proposal being discussed seems to
be shifting under out feet. That's the reason I got the proposals
given in the previous discussion of PEP 215 and PEP 215 itself
confused.

-- Steve