"Fred L. Drake, Jr." wrote:
Paul Prescod writes:
The major reason for doing it at compile time (for me) is that you can have a nice syntax that doesn't evolve modulus-ing (or dividing) an otherwise useless vars() or locals() dictionary.
Which has everything to do with your usage. I almost never use % with locals() or vars(), so I don't share that motivation.
Even so you have to modulus a tuple or a variable. That doesn't make any more sense for a newbie and is just as inconvenient for the script kiddie (which is often me!), compared to languages like Perl, Ruby, Tcl, sh etc. Python's interpolation syntax is: more verbose, more complicated, less secure and also more powerful. I have no problem with keeping the power but I'd like something less verbose and less complicated alongside it.
I'm much more likely to build a dict specifically for the purpose, which includes computed values, or have something already created which includes this usage as part of the larger picture.
I don't believe that this feature should be taken away from you. But I don't see how it relates to the PEP because what you want to do is already doable. PEP 215 is about making things *easier for simple cases*. If you have new, high-end needs for runtime string interpolation then PEP 215 probably won't address them. Paul Prescod