[issue1158231] string.Template does not allow step-by-step replacements

Raymond Hettinger report at bugs.python.org
Thu Aug 12 00:17:49 CEST 2010


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

FWIW, the $name $$ $(name) convention is used many other contexts and I don't think there is usually support provided to not substitute $$.  Even if there were, there is a usability issue where the final substitution needs to be applied differently to get the effect of escaping.  Since the final step needs to be different anyway, it is no burden to just use the current string.Template and write $(dollar_sign) in-place of $$ and apply that substitution on the final step.

Also, the current API for extending string.Template is already complex.  IMO, it is not a good idea to add more options to something that was supposed to provide a simpler alternative to templating.

----------
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1158231>
_______________________________________


More information about the Python-bugs-list mailing list