[Python-ideas] Draft PEP on string interpolation

Petr Viktorin encukou at gmail.com
Mon Aug 24 14:46:03 CEST 2015


On Mon, Aug 24, 2015 at 2:41 PM, Eric V. Smith <eric at trueblade.com> wrote:
> On 08/24/2015 07:35 AM, Paul Moore wrote:
>> I'm once again losing the thread of all the variations being proposed.
>>
>> As a reality check, is the expectation that something like the
>> following will still be possible:
>>
>> print(f"Iteration {n}: Duration {end-start} seconds")
>
> Yes, that's the PEP 498 proposal. I think (and this is just my opinion)
> that if we do something more complicated, like the delayed interpolation
> of i-strings, that we'd still keep f-strings.
>
> And further, while internally we may rewrite f-strings to use the
> i-string infrastructure, to the user they'd still look like the same
> f-strings.
>
>> Explicit str() calls or temporary variables or anything like that are
>> no improvement over the current options. Of course they may offer more
>> advanced features, but let's not lose the 80% case for the sake of the
>> 20% (that's actually more like 95-5, to be honest).
>
> Agreed.

Indeed. On the other hand, let's make reasonably sure that next year
we won't need yet another syntax for the 20%.


More information about the Python-ideas mailing list