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

Steven Majewski sdm7g@Virginia.EDU
Mon, 14 Jan 2002 18:11:30 -0500 (EST)


>     Paul> Sorry I wasn't clear. Let's say it's the second hour of our
>     Paul> Perl/Python class.
>
>     Paul> Here's Perl:
>
>     Paul> $a = 5;
>     Paul> $b = 6;
>     Paul> print "$a $b";
>
>     ...
>
>     Paul> Here's Python:
>
>     Paul> a = 5;
>     Paul> b = 6;
>     Paul> print "%(a)s %(b)s" % vars()
>

How does Perl handle it if the tokens aren't whitespace separated?
Is there an optional enclosing bracket as in shell syntax ?

How do you do:  "%(word)sly yours" %  vocabulary ?

(Sorry-- I stopped Perling somewhere around version 4.)

-- Steve Majewski