[Baypiggies] Output generation - (string operations/triple quote/template)
Mike Cheponis
mac at Wireless.Com
Wed Feb 14 00:27:03 CET 2007
On Tue, 13 Feb 2007, Tung Wai Yip wrote:
> My HTMLTestRunner is a real world example of generating moderately complex
> text output using triple quoted text blocks.
>
> http://tungwaiyip.info/software/HTMLTestRunner.html
>
> I agree with JJ that template language is another good alternative,
> especially for more complex generation. While this is subjective and
> everyone have different criteria, I consider the approach of interleaving
> Python code with the target output hard to maintain. It goes back to the
> Java Servlet approach and the many addon projects later to provide better
> alternatives.
Are you sort-of saying that having a separate template is like having a ".h" file, and that keeping code+data local in the program makes things easier to understand, and, therefore, perhaps Python needs to include better templating features?
(Yes, I know I'm putting lots of words in your mouth, but I'd appreciate more detail on what you mean.)
Thanks,
-Mike
More information about the Baypiggies
mailing list