Comment 8 for bug 502823

Revision history for this message
Cory Dodt (corydodt) wrote :

Also, I kept special handling for callables: they will still get called when the template asks for them as a variable, e.g.

class FooPage(rend.Page):
    docFactory = genshifile('foo.xhtml')
    def date(self):
        return str(datetime.datetime())

(... in the template ...)

<div>$date</div>

will still produce <div>(current timestamp)</div>. Again, this is possible because lazy evaluation means never having to call things and get side effects.