On Tue, Jan 1, 2013 at 9:48 PM, Terry Brown <[email protected]> wrote:
> On Tue, 1 Jan 2013 17:03:05 -0800 (PST) > "Edward K. Ream" <[email protected]> wrote: > > > Generating an html file with minimal stress on the gc is an obvious > > application. > > Nice. An HTML specific approach which avoids things like the > r.div_end() construct is the LXML element factory: > http://lxml.de/tutorial.html#the-e-factory > Beautiful. With the list framework the revised r.div method would be something like:: def div(self,aList): compute old and new indents return [ <div>, with old indent, aList, with new indent, </div>, with old indent, ] An example of the pattern in use:: return [ ... r.div([ contents of the div, ]), ... ] Similarly for span, etc. Thanks for pointing this out. This is too good to ignore. I'll do it soon. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
