[Python-Dev] PEP 215 redux: toward a simplified consensus?

Barry A. Warsaw barry@zope.com
Mon, 25 Feb 2002 22:12:22 -0500


>>>>> "GE" == Greg Ewing <greg@cosc.canterbury.ac.nz> writes:

    GE> Also, it uses up one of the three precious not-yet-used
    GE> characters, and I think we should keep those for some
    GE> future time when we really need them. We don't need one
    GE> for this -- there are plenty of operators available
    GE> that haven't yet been used on strings.

    GE> I suggest '^', since it does a nice job of suggesting
    GE> "inject stuff into this string". We can have both a
    GE> prefix form for compile-time interpolation:

    GE>   a = ^ "My name is $name"

    GE> and an infix form for run-time interpolation:

    GE>   a = "My name is $name" ^ dict

I think I suggested using ~ for this at IPC10:

    a = ~'my name is $name'

for the compile-time interpolation.  I don't think it matters much
which operator is chosen (let Guido decide).

-Barry