From 78f4e11012d94b8a0f8abb6342fc5395392d29a0 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Fri, 19 Oct 2012 15:43:27 -0700 Subject: Rename variable for return value of RenderEngine.fetch_section_data(). --- pystache/parser.py | 4 ++-- pystache/renderengine.py | 4 ++++ 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: -- cgit v1.2.1