On Sep 14, 2012, at 8:52 PM, Calvin Young wrote:
> I just stumbled upon this post on Hacker News, in which one user suggests writing a "for" loop using this syntax: <% for r in rows %> ${r.name} <% endfor %>
> http://news.ycombinator.com/item?id=388874
> Seeing has how this post is over 3 years old, is this just the old Mako syntax? Is there any way to enable it in the latest version of Mako? I find it much more readable, so it'd be great to be able to use it.
that syntax is not correct.
the "for" block is via the % for / %endfor pair.
If you want a "for" all on one line, the best you can do is a list/generator comprehension:
${" ".join(r.name for r in rows)}