[Tim Delaney <timothy.c.delaney@gmail.com>]... I also assumed (not having actually used an f-string) that all its formatting arguments were evaluated before formatting.It's a string - it doesn't have "arguments" as such. For example:
Agreed "argument" is the wrong word, but so is "string". It's an expression returning a string, in which a, b and n are free variables. I think we can understand it best as a string-display (https://docs.python.org/3/reference/expressions.html#list-displays), or a sort of eval() call.def f(a, b, n): return f"{a+b:0{n}b}" # the leading "f" makes it an f-string
'{1} {0}'.format(a(), b()) # E1
f'{b()}{a()}' # E2