summaryrefslogtreecommitdiff
path: root/pystache/parsed.py
diff options
context:
space:
mode:
Diffstat (limited to 'pystache/parsed.py')
-rw-r--r--pystache/parsed.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/pystache/parsed.py b/pystache/parsed.py
index e94c644..a7c0aae 100644
--- a/pystache/parsed.py
+++ b/pystache/parsed.py
@@ -8,6 +8,16 @@ Exposes a class that represents a parsed (or compiled) template.
class ParsedTemplate(object):
+ """
+ Represents a parsed or compiled template.
+
+ An instance wraps a list of unicode strings and node objects. A node
+ object must have a `render(engine, stack)` method that accepts a
+ RenderEngine instance and a ContextStack instance and returns a unicode
+ string.
+
+ """
+
def __init__(self):
self._parse_tree = []
@@ -18,10 +28,8 @@ class ParsedTemplate(object):
"""
Arguments:
- node: a unicode string or node object instance. A node object
- instance must have a `render(engine, stack)` method that
- accepts a RenderEngine instance and a ContextStack instance and
- returns a unicode string.
+ node: a unicode string or node object instance. See the class
+ docstring for information.
"""
self._parse_tree.append(node)