On Mon, 25 Sept 2023 at 00:15, Dom Grigonis <dom.grigo...@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 _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/GZPWQBKAGSIQEF5QAFMZ3XYYT34WIPAT/ Code of Conduct: http://python.org/psf/codeofconduct/