The finalize function seems to be executed on the whole template, not only on variables.
E.g. a function like
def fin(s): print s; return s
dumps the whole template file.
Any input on this, we're running into the same thing?
We like to look at the variable expressions and modify them based on different criteria but returning the entire template makes this impossible.
I'm seeing this too. It seems like finalize should run only on expressions evaluated during render, but it runs when the template is constructed also.