Mercurial > genshi > genshi-test
comparison markup/template.py @ 82:c82c002d4c32
Some minor cleanup.
author | cmlenz |
---|---|
date | Sat, 15 Jul 2006 11:59:13 +0000 |
parents | cc034182061e |
children | c6f07b7cd3ea |
comparison
equal
deleted
inserted
replaced
81:cc034182061e | 82:c82c002d4c32 |
---|---|
9 # | 9 # |
10 # This software consists of voluntary contributions made by many | 10 # This software consists of voluntary contributions made by many |
11 # individuals. For the exact contribution history, see the revision | 11 # individuals. For the exact contribution history, see the revision |
12 # history and logs, available at http://markup.edgewall.org/log/. | 12 # history and logs, available at http://markup.edgewall.org/log/. |
13 | 13 |
14 """Template engine that is compatible with Kid (http://kid.lesscode.org) to a | 14 """Implementation of the template engine.""" |
15 certain extent. | |
16 | |
17 Differences include: | |
18 * No generation of Python code for a template; the template is "interpreted" | |
19 * No support for <?python ?> processing instructions | |
20 * Expressions are evaluated in a more flexible manner, meaning you can use e.g. | |
21 attribute access notation to access items in a dictionary, etc | |
22 * Use of XInclude and match templates instead of Kid's py:extends/py:layout | |
23 directives | |
24 * Real (thread-safe) search path support | |
25 * No dependency on ElementTree (due to the lack of pos info) | |
26 * The original pos of parse events is kept throughout the processing | |
27 pipeline, so that errors can be tracked back to a specific line/column in | |
28 the template file | |
29 * py:match directives use (basic) XPath expressions to match against input | |
30 nodes, making match templates more powerful while keeping the syntax simple | |
31 | |
32 Todo items: | |
33 * Improved error reporting | |
34 * Support for list comprehensions and generator expressions in expressions | |
35 """ | |
36 | 15 |
37 try: | 16 try: |
38 from collections import deque | 17 from collections import deque |
39 except ImportError: | 18 except ImportError: |
40 class deque(list): | 19 class deque(list): |