summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-10-19 15:43:27 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-10-19 15:43:27 -0700
commit78f4e11012d94b8a0f8abb6342fc5395392d29a0 (patch)
tree5904647efc65be1fde2b72de283f90f0514bac89
parentd286898642a7d6b994f502763cd49f4cfd8ddc7f (diff)
downloadpystache-78f4e11012d94b8a0f8abb6342fc5395392d29a0.tar.gz
Rename variable for return value of RenderEngine.fetch_section_data().
-rw-r--r--pystache/parser.py4
-rw-r--r--pystache/renderengine.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/pystache/parser.py b/pystache/parser.py
index 4c37ec3..8dc74b5 100644
--- a/pystache/parser.py
+++ b/pystache/parser.py
@@ -189,10 +189,10 @@ class _SectionNode(object):
return _format(self, exclude=['delimiters', 'template'])
def render(self, engine, context):
- data = engine.fetch_section_data(context, self.key)
+ values = engine.fetch_section_data(context, self.key)
parts = []
- for val in data:
+ for val in values:
if callable(val):
# Lambdas special case section rendering and bypass pushing
# the data value onto the context stack. From the spec--
diff --git a/pystache/renderengine.py b/pystache/renderengine.py
index ef2c145..83cd24e 100644
--- a/pystache/renderengine.py
+++ b/pystache/renderengine.py
@@ -108,6 +108,10 @@ class RenderEngine(object):
return val
def fetch_section_data(self, context, name):
+ """
+ Fetch the value of a section as a list.
+
+ """
data = self.resolve_context(context, name)
# From the spec: