Mercurial > genshi > mirror
comparison examples/bench/kid/template.kid @ 81:d60486018004 trunk
Template expressions are now compiled to Python bytecode.
author | cmlenz |
---|---|
date | Sat, 15 Jul 2006 11:29:25 +0000 |
parents | 85f70ec37112 |
children |
comparison
equal
deleted
inserted
replaced
80:e0957965553f | 81:d60486018004 |
---|---|
14 <div>${greeting('world')}</div> | 14 <div>${greeting('world')}</div> |
15 | 15 |
16 <h2>Loop</h2> | 16 <h2>Loop</h2> |
17 <ul py:if="items"> | 17 <ul py:if="items"> |
18 <li py:for="idx, item in enumerate(items)" py:content="item" | 18 <li py:for="idx, item in enumerate(items)" py:content="item" |
19 class="${idx == len(items) and 'last' or None}" /> | 19 class="${idx + 1 == len(items) and 'last' or None}" /> |
20 </ul> | 20 </ul> |
21 </body> | 21 </body> |
22 </html> | 22 </html> |