Using Python to generate code?
Jeffrey Froman
jeffrey at fro.man
Thu Sep 9 00:16:00 EDT 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.
Jeffrey
More information about the Python-list
mailing list