[ZCM] [ZC] 2144/ 2 Comment "ZPT repeat "oddness""
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Fri Jul 7 07:14:31 EDT 2006
Issue #2144 Update (Comment) "ZPT repeat "oddness""
Status Pending, Zope/bug medium
To followup, visit:
http://www.zope.org/Collectors/Zope/2144
==============================================================
= Comment - Entry #2 by ajung on Jul 7, 2006 7:14 am
The Zope 2.9 behavior is correct.
The ZPT references says for "even": true for even-indexed repetions...so for the first iteration which is the zero-th repetition 'even' is correct.
________________________________________
= Request - Entry #1 by philikon on Jul 7, 2006 7:03 am
While fixing http://www.zope.org/Collectors/Zope/2141, I realized that Zope 2.9 behaves "oddly" (pun intended!) regarding odd/even. Take the following ZPT snippet:
<html>
<body>
<ol tal:define="results python:range(5)">
<tal:block tal:repeat="fudge results">
<li tal:define="odd repeat/fudge/odd"
tal:content="python:odd and 'odd' or 'even'">Content</li>
</tal:block>
</ol>
</body>
</html>
In Zope 2.9, this will yield:
1. even
2. odd
3. even
4. odd
5. even
I find that certainly weird. Zope 3 (and hence Zope 2.10+) produce:
1. odd
2. even
3. odd
4. even
5. odd
I guess we'll have to decide whether this is a bug or feature in Zope 2.9, and hence either adjust Zope 2.10 to match Zope 2.9's behaviour or fix Zope 2.9.
==============================================================
More information about the Zope-Collector-Monitor
mailing list