{% for key, entries in genindexentries %}
<h2 id="{{ key }}">{{ key }}</h2>
<table class="indextable"><tr>
- {%- for column in entries|slice(2) %}{% if column %}
+ {%- for column in entries|slice(2) if column %}
<td><dl>
{%- for entryname, (links, subitems) in column %}
<dt>{% if links %}<a href="{{ links[0] }}">{{ entryname|e }}</a>
{%- endif -%}
{%- endfor %}
</dl></td>
- {%- endif %}{% endfor %}
+ {%- endfor %}
</tr></table>
{% endfor %}
self.stream.expect('name:in')
iter = self.parse_tuple(no_condexpr=True)
test = None
- if self.stream.current.type is 'name:if':
+ if self.stream.current.test('name:if'):
self.stream.next()
test = self.parse_expression()
body = self.parse_statements(('name:endfor', 'name:else'))