[Python-ideas] Draft PEP on string interpolation

Mike Miller python-ideas at mgmiller.net
Fri Aug 21 21:52:04 CEST 2015


Yes, we were discussing these custom prefixes in Yuri's thread yesterday, but 
Guido dropped a big -1 there.  However, you Eric and Nick make some compelling 
arguments in favor of them; they do solve several of our outstanding issues.

Would he be able to be persuaded to change his mind?

-Mike

(Note: I edited out the backticks aspect from below, don't think it will be 
possible or desired, as Chris R. demonstrated in this thread.)


On 08/21/2015 09:35 AM, Eric V. Smith wrote:
>> On 08/21/2015 07:49 AM, Nick Coghlan wrote:
>>>> of people doing the wrong thing. At that point, the JavaScript
>>>> arbitrary-named-callable solution starts looking very
>>>> attractive:
>>>>
>>>>     myquery = sql"SELECT $column FROM $table;"
>>>      ....
>
> If you really want string interpolation to be extensible to domains such
> as SQL and HTML, then I think an approach like Yuri's is the only way to
> do it: some syntax to tell the compiler to treat a string differently,


More information about the Python-ideas mailing list