When using this:
<span>
<tal:x tal:repeat="field
python:request.form['@columns'].value.split(',')">
<tal:x tal:replace="field"></tal:x>
<tal:x tal:condition="repeat/field/first"
tal:content="repeat/field/Letter"></tal:x>
<tal:x tal:condition="repeat/field/last"
tal:content="repeat/field/letter"></tal:x>
</tal:x>
</span>
with an index page, you used to see:
title A a id B b status C c creator D d assignedto E e activity F f
I expected:
title A id status creator assignedto activity f
first() and last() call same_part(). I have no idea what same_part is supposed
to do. In some circumstances it will make last()/first() return True even though
there are more items in the iterator.
However I can fix the original TAL to produce what I expect by having first/last return:
return self.same_part(name, ...)
rather than:
return not self.same_part(name, ...)
|