durusmail: quixote-users: Re: PTL docs
Re: PTL docs
2001-06-07
2001-06-07
Re: PTL docs
Andrew Kuchling
2001-06-07
On Thu, Jun 07, 2001 at 03:41:16PM -0400, Goodger, David wrote:
>One small point you may want to mention is that you need to print or str()
>the output of a template call. In the interactive interpreter, you get a
>TemplateIO object. I wasted a few frustrating minutes doing this kind of

Good idea!  I'll check in this patch:

+
+Templates don't return a string.  Instead they return a TemplateIO
+object, which can be converted to a string using str() in order to
+output it.  TemplateIO objects are an optimization; rather than
+modifying a single string as each value is added, TemplateIO appends
+each chunk to a list and uses string.join() on that list when the
+conversion to string is performed.

--amk


reply