]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Cleaned up some code that no longer needs to exist
authorArmin Ronacher <armin.ronacher@active-4.com>
Mon, 2 Jan 2017 21:06:56 +0000 (22:06 +0100)
committerArmin Ronacher <armin.ronacher@active-4.com>
Tue, 3 Jan 2017 22:45:29 +0000 (23:45 +0100)
jinja2/compiler.py

index c9be7ec100a9237582da0c25fdf6544a5f1fc145..5a2b7e0e60614612a51f5ff8351a95eb2a20a7e7 100644 (file)
@@ -147,10 +147,6 @@ class Frame(object):
         rv.symbols = self.symbols.copy()
         return rv
 
-    def inspect(self, nodes):
-        # XXX: remove me
-        pass
-
     def inner(self):
         """Return an inner frame."""
         return Frame(self.eval_ctx, self)
@@ -159,6 +155,8 @@ class Frame(object):
         """Return a soft frame.  A soft frame may not be modified as
         standalone thing as it shares the resources with the frame it
         was created of, but it's not a rootlevel frame any longer.
+
+        This is only used to implement if-statements.
         """
         rv = self.copy()
         rv.rootlevel = False
@@ -909,8 +907,7 @@ class CodeGenerator(NodeVisitor):
                 if self.environment.is_async:
                     self.write(')')
             self.write(' if (')
-            test_frame = loop_frame.copy()
-            self.visit(node.test, test_frame)
+            self.visit(node.test, loop_frame)
             self.write('))')
 
         elif node.recursive: