diff options
Diffstat (limited to 'docs/templates.rst')
-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 |