[Python-Dev] Subtle difference between f-strings and str.format()

Nick Coghlan ncoghlan at gmail.com
Fri Mar 30 06:25:01 EDT 2018


On 30 March 2018 at 20:05, Serhiy Storchaka <storchaka at gmail.com> wrote:
> 30.03.18 02:16, Steven D'Aprano пише:
>>
>> Is there a down-side to 2b? It sounds like something you might end up
>> doing at a later date regardless of what you do now.
>
> This complicate the compiler and the eval loop, especially in the case of
> nested substitutions in formats, like
>
>     f'{value:+{width:d}.{prec:d}f}'

This point reminded me that there's still
ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant