From: Armin Ronacher Date: Mon, 21 May 2007 21:52:15 +0000 (+0200) Subject: [svn] iteration over an undefined singleton is now handled in the singleton itself... X-Git-Tag: 2.0rc1~319 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c1c11111ba52b36be4438d5110528d85bfb82828;p=jinja2.git [svn] iteration over an undefined singleton is now handled in the singleton itself and not the loop context --HG-- branch : trunk --- 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: