[issue12518] In string.Template it's impossible to transform delimiter in the derived class

R. David Murray report at bugs.python.org
Sat Jul 9 04:54:58 CEST 2011


R. David Murray <rdmurray at bitdance.com> added the comment:

You are correct that this is a feature request as written.  I think there is also a doc bug (the docs should probably mention that changing delimiter after class creation is a no-op).

To add this feature the computation of the regex would need to be moved from the metaclass init to the object init.  The question is, was doing this in a metaclass a design decision (perhaps a micro-optimization?), or a "cute trick" that turns out to cause unintuitive consequences?  I think Barry was involved in adding the Template feature, so I'm adding him as nosy (I don't have a clone handy to check hg annotate).

----------
nosy: +barry, r.david.murray
versions: +Python 3.3 -Python 3.2

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


More information about the Python-bugs-list mailing list