[PATCH] allow partial replace in string.Template
Stefan Behnel
stefan.behnel-n05pAM at web.de
Mon Feb 14 10:14:38 EST 2005
Nick Coghlan wrote
> a) Patches are more likely to be looked at if placed on the SF patch
> tracker.
see your own b), I wanted to discuss them first.
> b) I don't quite see the point, given how easy these are to spell using
> the basic safe_substitute. You're replacing one liners with one-liners.
Still, when I first tried out the Template class, I immediately stumbled over
the fact that the substitute methods always return strings, and never Template
objects. While it makes sense for their primary purpose, it totally restricts
the usage of this module to one-show operations.
Being able to partially evaluate the Template is something that is absolutely
missing in the implementation. I consider that a bug that should be fixed for
2.5 at latest.
Stefan
More information about the Python-list
mailing list