Using Python to generate code?
jeffrey at fro.man
Thu Sep 9 06:16:00 CEST 2004
Steven Bethard wrote:
> So, yes, the Template solution is cleaner, but not drastically so. It
> saves you 3 characters per variable -- '(', ')' and 's'. Of course the
> more variables you have to write, the bigger the deal it is
True, and calling string.Template() is an extra 17 characters, so there
would have to be 6 variables in your string before you got a typing
payoff. :-) Of course, some people might prefer the look of the Template.
More information about the Python-list