replace_missing_format_keys

PlasmaCalcs.tools.pytools.replace_missing_format_keys(s, keys, replacement)

return s (a format string) with all missing keys replaced by replacement.

E.g. (‘{present} and {missing}’, [‘present’], ‘MISSING’) –> ‘present and MISSING’

keys: iterable of keys. (dict is also acceptable.)