On Fri, Aug 19, 2016 at 3:39 PM, David Mertz <me...@gnosis.cx> wrote:

> I don't think I've ever used a syntax highlighter than changed color of \n
> in a string. I get the concept, but I haven't suffered for the absence of
> that.
>
> Moreover, although I haven't yet used them, I really doubt I want extra
> syntax highlighting in f-strings beyond simply the color strings appear as.
> Well, maybe a uniform distinction for f-string vs. some other kind of
> string, but nothing internal to the string.
>
> YMMV, but that would be my preference in my text editor. Curly braces are
> perfectly good visual distinction to me.
>
At least vim does this and so does Sublime Text IIRC. Maybe I spend a lot
of time writing shell code too, but I very much appreciate the extra visual
cue.

The only real point I'm trying to make is that expressions within an
f-string are an *escape*. They escape the normal semantics of a string
literal and instead do something else for a while. Therefore, the escaped
sections should not look like (or need to conform to) the rest of the
string and they should not require quoting as if it were still within the
string, because I escaped it already!
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to