[Python-ideas] Let’s make escaping in f-literals impossible
Terry Reedy
tjreedy at udel.edu
Fri Aug 19 14:07:48 EDT 2016
On 8/19/2016 2:07 AM, אלעזר wrote:
>
>
> בתאריך יום ו׳, 19 באוג' 2016, 08:29, מאת Terry Reedy
> <tjreedy at udel.edu
> <mailto:tjreedy at udel.edu>>:
>
> On 8/18/2016 8:18 PM, Steven D'Aprano wrote:
> > On Fri, Aug 19, 2016 at 02:17:29AM +1000, Chris Angelico wrote:
> >
> >> Format codes are just text,
> >
> > I really think that is wrong. They're more like executable code.
> >
> > https://www.python.org/dev/peps/pep-0498/#expression-evaluation
>
> I agree with you here. I just note that the strings passed to exec,
> eval, and compile are also executable code strings (and nothing but!).
> But I don't remember a suggestion that *they* should by colored as
> anything other than a string.
>
>
> But these are objects of type str, not string literals. If they were, I
> guess someone would have suggested such coloring.
I was referring to strings created by string literals in the code
sitting in an editor.
--
Terry Jan Reedy
More information about the Python-ideas
mailing list