[svn] iteration over an undefined singleton is now handled in the singleton itself...
authorArmin Ronacher <armin.ronacher@active-4.com>
Mon, 21 May 2007 21:52:15 +0000 (23:52 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Mon, 21 May 2007 21:52:15 +0000 (23:52 +0200)
--HG--
branch : trunk

jinja/datastructure.py

index 22864b52bec51fb7f81ff8e19d8e0b400e4c460e..a2350abeb24d48109cb7f4905215fdc5ed0b05b1 100644 (file)
@@ -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: