The correct way to achieve this would probably be to subclass string.Formatter class and use its instance instead of the string method:
from string import Formatter
class IncrementalFormatter(Formatter):
pass # your implementation
f = IncrementalFormatter()
f.format("hello {name}", name="Tom")
The following Formatter methods would have to be overwritten:
get_value() should return some special object instead of raising LookupError.
get_field() should save field_name argument into this object (or proceed normally if the object is not our special object).
convert_field() should just save conversion argument into this object and do no conversion (or proceed normally...).
format_field() should reconstruct field format string from the special object using its field_name and conversion attributes and format_spec argument of this method (or proceed normally...).
So, for example:
f.format("{greet} {who.name!r:^16s}", greet="hello")
should result in "hello {who.name!r:^16s}", where "who.name" is field_name, "r" is conversion, "^16s" is format_spec and all these three values were re-combined back into "{who.name!r:^16s}", so that it can be used in the next formatting pass.
Additional note: the special object should return itself upon access of any attribute (with .) or item (with []).