Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] for...else implementation on templating #35

Open
cezarsmpio opened this issue Sep 20, 2016 · 1 comment
Open

[QUESTION] for...else implementation on templating #35

cezarsmpio opened this issue Sep 20, 2016 · 1 comment
Labels

Comments

@cezarsmpio
Copy link

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!

@antonmedv
Copy link
Owner

Hi, thanks. Nice feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants