On 20 August 2016 at 05:02, Random832 <[email protected]> wrote:
> On Fri, Aug 19, 2016, at 19:09, Paul Moore wrote:
>> So, to me
>>
>>  f'{x.partition(' + ')[0]}'
>>
>> reads as a string concatenation. I'm not sure how you'd expect a
>> syntax highlighter to make it look like anything else, to be honest
>
> One possible syntax highlighting scheme:

Thanks for the detailed explanation and example. Yes, that may well be
a reasonable highlighting scheme.

I'd still object to reusing single quotes in the example given,
though, as it would be confusing if printed, or in email, etc. And as
a general principle, "needs syntax highlighting to be readable" is a
problem to me. So I stand by my statement that as a style rule,
f-strings should be written to work identically regardless of whether
this proposal is implemented or not.

Paul
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to