[Python-ideas] extensible template strings

Yury Selivanov yselivanov.ml at gmail.com
Thu Aug 20 03:50:47 CEST 2015


On 2015-08-19 7:43 PM, Guido van Rossum wrote:
> As others have pointed out the syntax is problematic; it's too easy to 
> accidentally write
>
>   foo "bar"
>
> instead of
>
>   foo, "bar"

I think we should disallow whitespace between NAME and STRING
tokens:

     foo'...'

but not

     foo   '...'

(same as with the current syntax -- you can't write ``r ''``)

This should help users to avoid temptation to put a comma there.

Yury


More information about the Python-ideas mailing list