diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2017-01-03 01:37:35 +0100 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2017-01-03 23:45:29 +0100 |
commit | 3f4eb2123418226f8628ada06a469611e78573c3 (patch) | |
tree | 752f22b872a85f2cc92afb7572ff5d8376ee378f /jinja2 | |
parent | 8d06cfb64e3d395aba32eef47e803e659e0d1b70 (diff) | |
download | jinja-3f4eb2123418226f8628ada06a469611e78573c3.tar.gz |
Clarified for else todo
Diffstat (limited to 'jinja2')
-rw-r--r-- | jinja2/compiler.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jinja2/compiler.py b/jinja2/compiler.py index 03866b52..a7fb325c 100644 --- a/jinja2/compiler.py +++ b/jinja2/compiler.py @@ -842,7 +842,8 @@ class CodeGenerator(NodeVisitor): def visit_For(self, node, frame): # TODO: this should really use two frames: one for the loop body - # and a separate one for the loop else block. + # and a separate one for the loop else block. This also is needed + # because the loop variable must not be visible in the else block loop_frame = frame.inner() # try to figure out if we have an extended loop. An extended loop |