Mercurial > genshi > mirror
annotate examples/bench/kid/template.kid @ 916:5ba6268420e7 experimental-py3k
add support for python 3 to genshi.filters:
* minor changes to track encoding=None API change in core genshi modules.
* renamed genshi/filters/tests/html.py to test_html.py to avoid clashes with Python 3 top-level html module when running tests subset.
* did not rename genshi/filters/html.py.
* i18n filters:
* ugettext and friends are gone in Python 3 (and only gettext and friends exist and they now handle unicode)
* Some \ line continuations inside doctests confused 2to3 and so were removed them.
* Testing picked up a problem (already present in trunk) where Translator.__call__ could end up defining gettext as an endlessly recursive function. Noted with a TODO.
author | hodgestar |
---|---|
date | Sun, 24 Oct 2010 22:21:28 +0000 |
parents | d60486018004 |
children |
rev | line source |
---|---|
57
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
1 <!DOCTYPE html |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
4 <html xmlns="http://www.w3.org/1999/xhtml" |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
5 xmlns:py="http://purl.org/kid/ns#" |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
6 py:extends="'base.kid'" |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
7 lang="en"> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
8 <head> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
9 <title>${title}</title> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
10 </head> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
11 <body> |
76 | 12 <div>${greeting(user)}</div> |
69 | 13 <div>${greeting('me')}</div> |
76 | 14 <div>${greeting('world')}</div> |
57
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
15 |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
16 <h2>Loop</h2> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
17 <ul py:if="items"> |
69 | 18 <li py:for="idx, item in enumerate(items)" py:content="item" |
81
d60486018004
Template expressions are now compiled to Python bytecode.
cmlenz
parents:
76
diff
changeset
|
19 class="${idx + 1 == len(items) and 'last' or None}" /> |
57
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
20 </ul> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
21 </body> |
300b6a3b0730
Add some simple benchmarks to compare performance against Clearsilver, Kid, Cheetah, and more soon.
cmlenz
parents:
diff
changeset
|
22 </html> |