Variable Interpolation - status of PEP 215
Paul Rubin
phr-n2002b at NOSPAMnightsong.com
Thu Jun 20 03:44:33 EDT 2002
aahz at pythoncraft.com (Aahz) writes:
> Peter already told you what you really wanted to know, but for the
> benefit of other people, PEP 215 is dead and PEP 292 is currently the
> subject of a LARGE thread on python-dev.
Another suggestion: rather than adding the clumsy sub() method,
how about overloading a unary prefix operator on strings? For
example the unary minus sign: say
print -"my name is ${name}"
instead of
print "my name is ${name}".sub()
Note that unlike PEP 215, this is not a syntax change. It's just
operator overloading. I think it can already be implemented
in Python 2.2 using a string subclass. In fact perhaps PEP 215
can be implemented the same way, using "-" as the prefix instead of "$".
More information about the Python-list
mailing list