[Baypiggies] Output generation - (string operations/triple quote/template)
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.
> 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
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.)
More information about the Baypiggies