Staging: this is not the live site, pydocs.org.
A string class for supporting $-substitutions. Members of Template g get_identifiers Returns a list of the valid identifiers in the template, in the order they first appear, ignoring any invalid identifiers. i is_valid Returns False if the template has invalid placeholders that will cause substitute() to raise ValueError. s safe_substitute Like substitute(), except that if placeholders are missing from mapping and kwds, instead of raising a KeyError exception, the original placeholder will appear in the resulting string intact. substitute Performs the template substitution, returning a new string. t template This is the object passed to the constructor’s template argument.
Python docs © Python Software Foundation · Examples CC0 ·
Source on GitHub · Not affiliated with the PSF