antonmedv/monkberry

[QUESTION] for...else implementation on templating

cezarsmpio opened this issue · 1 comments

Hi guys, first of all, this library is just amazing!

What dou you think guys about implement something like this in templating:

{% for array %}
    ....
{% else %}
   // array is empty
{% endfor %}

Python has a good example of this implementation.

>>> for x in [1]:
...     print("Then")
... else:
...     print("Else")

Thanks!

Hi, thanks. Nice feature.