diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2013-05-19 04:31:48 -0700 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2013-05-19 04:31:48 -0700 |
commit | e403e52f42a6a2330fda5c4fc5930ee147e56411 (patch) | |
tree | 6e64cfd4364b767c1b13a969eddb1d8a8951dd78 | |
parent | fe63b44889d2b50729d7e3bddb7dfc3c287a10cf (diff) | |
parent | 4780c2ce31e9701cd60e227fee83a20cea8b7a8f (diff) | |
download | jinja2-e403e52f42a6a2330fda5c4fc5930ee147e56411.tar.gz |
Merge pull request #112 from Cito/master
Addition/correction for pull request #69 - add note to docs
-rw-r--r-- | docs/templates.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/templates.rst b/docs/templates.rst index c60b27f..6bc6e04 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -612,6 +612,10 @@ by using `else`:: {% endfor %} </ul> +Note that in Python `else` blocks are executed whenever the corresponding +loop did not `break`. Since in Jinja loops cannot `break` anyway, +a slightly different behavior of the `else` keyword was chosen. + It is also possible to use loops recursively. This is useful if you are dealing with recursive data such as sitemaps. To use loops recursively you basically have to add the `recursive` modifier to the loop definition and |