[issue13173] Default values for string.Template
Barry A. Warsaw
report at bugs.python.org
Mon Nov 7 20:21:07 CET 2011
Barry A. Warsaw <barry at python.org> added the comment:
When I need defaults, I make them part of the mapping that gets passed into .substitute() and .safe_substitute(). It doesn't feel to me like it's necessary to attach them to the Template instance. Also, couldn't you just subclass string.Template if you wanted defaults? OTOH, since it can be done in a backward compatible way, I guess I'm -0 on the change.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13173>
_______________________________________
More information about the Python-bugs-list
mailing list