Is it possible to do partial string formatting with the advanced string formatting methods, similar to the string template safe_substitute() function?
safe_substitute()
F
You could use the partial function from functools which is short, most readable and also describes the coder's intention:
partial
functools
from functools import partial s = partial("{foo} {bar}".format, foo="FOO") print s(bar="BAR") # FOO BAR