From c1c11111ba52b36be4438d5110528d85bfb82828 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 21 May 2007 23:52:15 +0200 Subject: [PATCH] [svn] iteration over an undefined singleton is now handled in the singleton itself and not the loop context --HG-- branch : trunk --- jinja/datastructure.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jinja/datastructure.py b/jinja/datastructure.py index 22864b5..a2350ab 100644 --- a/jinja/datastructure.py +++ b/jinja/datastructure.py @@ -324,7 +324,10 @@ class LoopContext(object): Push a sequence to the loop stack. This is used by the recursive for loop. """ - if seq in (Undefined, None): + # iteration over None is catched, but we don't catch iteration + # over undefined because that behavior is handled in the + # undefined singleton + if seq is None: seq = () length = 0 else: -- 2.26.2