
On Mon, 25 Sept 2023 at 00:15, Dom Grigonis <dom.grigonis@gmail.com> wrote:
I see what you mean, but this property is arguably intrinsic to what it is. And is part of f-strings vs explicit formatting property too:
variable = 1 print(f'{variable=} and b={variable}') # VS msg = 'variable={v} and b={v}' print(msg.format(v=variable))
Especially, where msg can be pre-stored and reused.
What do you mean by that? Are you suggesting that there's a massive cost in constructing a string literal and thus reusing it with .format() is more efficient than an f-string? Because that's, uhh, kinda not the point of str.format(). And if that isn't what you mean, what is it? Your posts are often distinctly unclear. I get the impression that you think everyone else understands your idea. ChrisA