[Python-ideas] Draft PEP on string interpolation

Eric V. Smith eric at trueblade.com
Mon Aug 24 14:41:45 CEST 2015


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.

Eric.



More information about the Python-ideas mailing list