From 422934c893b54ee67dacf8219045050f2f9cc790 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 12 Mar 2007 17:32:18 +0100 Subject: [PATCH] [svn] small `__repr__` tweaks --HG-- branch : trunk --- jinja/datastructure.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/jinja/datastructure.py b/jinja/datastructure.py index 9ba9e9a..3b13ae0 100644 --- a/jinja/datastructure.py +++ b/jinja/datastructure.py @@ -139,6 +139,8 @@ class Context(object): result = {} for layer in self._stack[1:]: for key, value in layer.iteritems(): + if key.startswith('::'): + continue result[key] = value return result @@ -238,6 +240,15 @@ class LoopContext(object): 'to define them with the "recursive" ' 'modifier.') + def __repr__(self): + if self._stack: + return '' % ( + self.index, + self.length, + self.loop_function is not None and ' recursive' or '' + ) + return '' + class CycleContext(object): """ -- 2.26.2