On Fri, 2 Jul 2021, 5:12 pm Thomas Güttler, <info@thomas-guettler.de> wrote:Hi Nick and all other Python ideas friends,yes, you are right. There is not much difference between PEP-501 or my proposal.One argument why I would like to prefer backticks:Some IDEs detect that you want to use a f-string automatically:
You type:
name = 'Peter'
print('Hello {name...
and the IDE automatically adds the missing "f" in front of the string:
name = 'Peter'
print(f'Hello {name...
This is a handy feature (of PyCharm), which would not work reliably if there are two different prefixes.-------You mentioned these things:eager rendering: I think deferred rendering would increase the complexity a lot. And I think it is not needed.Eager rendering is f-strings. Any templating proposal necessarily involves a delayed rendering step, when the template is combined with the interpolated values.
runtime value interpolation: It is up to the receiver of types.InterpolationTemplate to handle the data structure.I really meant runtime template parsing here (i.e. str.format).dedicated templating libraries: One temp after the other. I think HTML and SQL libraries would adapt as soon as the foundationis available.The existence of i-strings likely wouldn't change the syntax of jinja2 templates, Django templates, SQL Alchemy, pandas, etc.I would be happy if PEP-501 would come true.So would I, but I still don't have a compelling answer to the "but it's yet another subtly different way to do it" objection.