hi all
consider following template
from mako.template import Template
t = Template(
"""
<%
l = l
%>
""".strip(),
strict_undefined=True,
)
print t.render(l=l)
would raise "NameError: name 'l' is not defined"
mako thought 'l' is locally_declared, is this a bug or feature?
I think this is caused by scope rule simulation,
say that though 'l' actually in function scope of render_body, where 'l' could be get from render context,
but in fact it is in the logical global scope, which is mimicked by mako, therefore mako wont try to exact 'l' from context.