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

Paul Moore p.f.moore at gmail.com
Wed Mar 28 15:05:33 EDT 2018


On 28 March 2018 at 19:44, Serhiy Storchaka <storchaka at gmail.com> wrote:

28.03.18 19:20, Guido van Rossum пише:

Hm, without thinking too much about it I'd say it's okay to change the evaluation order. Do you mean the option 3, right? This is the simplest option. I have already wrote a PR for optimizing old-style formating [1], but have not merged it yet due to this change of semantic.

I can't imagine (non-contrived) code where the fact that a is formatted before b is evaluated would matter, so I'm fine with option 3.

Paul



More information about the Python-Dev mailing list