A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-January/019472.html below:

[Python-Dev] PEP_215_ (string interpolation) alternative EvalDict

[Python-Dev] PEP_215_ (string interpolation) alternative EvalDict [Python-Dev] PEP_215_ (string interpolation) alternative EvalDictNeil Schemenauer nas@python.ca
Mon, 14 Jan 2002 17:54:53 -0800
Jason Orendorff wrote:
> The substitution only happens once.

My example was not well thought out.  I was thinking something more
like:

    secret_key = "spam"
    user = "joe"
    x = "$user said: " + raw_input()
    print $x

That wouldn't work either since $ only evaluates literals.  Amazing what
you learn by actually reading the PEP.  Yes, I'm an idiot.

After reading PEP 215 I like it a lot.  The fact that $ can only apply
to literals completely solves this issue.  Has Guido weighed in on it
yet?  I didn't find anything in the mail archives from him.

  Neil



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4