"Paul Wray" <paul.w...@det.nsw.edu.au> wrote: > >Ive had what I think is a great idea for pure-python templates (I can almost >hear the groans, bear with me...) >... >The idea: >Python syntax allows a statement to be a bare literal or identifier. These >have no effect on the program. >... >So is this (within the appropriate class context of course): > >def body(self, r): > '<h1>'; self.heading; '</h1>' > '<ul>' > for itm in self.items: > '<li>'; itm; '</li>' > '</ul>'
This is essentially how the original CherryPy version 1 web framework worked. In the end, I think it was decided that this represented too much of a mix of processing and presentation, and CherryPy 2 and 3 use a different scheme. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list