diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-05-06 11:40:55 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-05-06 11:40:55 -0700 |
commit | 331a48d0984b37dafd07efb2f3883ab6fafb2b34 (patch) | |
tree | a5a64d32b735f444169a83d81ffb91b9be227640 /pystache/parsed.py | |
parent | 8f9da1a7e1c86081233ac6c5a949292e36e25570 (diff) | |
download | pystache-331a48d0984b37dafd07efb2f3883ab6fafb2b34.tar.gz |
ParsedTemplate docstring udpates and removed RenderEngine.render_parsed().
Diffstat (limited to 'pystache/parsed.py')
-rw-r--r-- | pystache/parsed.py | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/pystache/parsed.py b/pystache/parsed.py index e3c746f..e94c644 100644 --- a/pystache/parsed.py +++ b/pystache/parsed.py @@ -3,39 +3,27 @@ """ Exposes a class that represents a parsed (or compiled) template. -This module is meant only for internal use. - """ class ParsedTemplate(object): def __init__(self): - """ - Arguments: - - parse_tree: a list, each element of which is either-- - - (1) a unicode string, or - (2) a "rendering" callable that accepts a ContextStack instance - and returns a unicode string. - - The possible rendering callables are the return values of the - following functions: - - * RenderEngine._make_get_escaped() - * RenderEngine._make_get_inverse() - * RenderEngine._make_get_literal() - * RenderEngine._make_get_partial() - * RenderEngine._make_get_section() - - """ self._parse_tree = [] def __repr__(self): return repr(self._parse_tree) def add(self, node): + """ + 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. + + """ self._parse_tree.append(node) def render(self, engine, context): |