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

Support for "is not" in tests #308

Closed
sersorrel opened this issue Jul 28, 2018 · 3 comments
Closed

Support for "is not" in tests #308

sersorrel opened this issue Jul 28, 2018 · 3 comments
Labels

Comments

@sersorrel
Copy link

Jinja2 supports using is not for tests, like so:

{% if 4 is not divisibleby(2) %}
everything is broken
{% endif %}

It would be awesome if Tera could support the same! if not 4 is divisibleby(2) just doesn't look as nice :)

@Keats
Copy link
Owner

Keats commented Jul 31, 2018

is not does look better but with this change if not 4 is not divisibleby(2) would also be valid and that does look ugly :/

@Keats
Copy link
Owner

Keats commented Sep 3, 2018

I'm still not sure about that, leaving it open to collect some feedback.

@Keats Keats mentioned this issue Sep 6, 2018
16 tasks
@jcgruenhage
Copy link

is not does look better but with this change if not 4 is not divisibleby(2) would also be valid and that does look ugly :/

Sure, it gives people more options to make ugly expressions, but it also gives them options to avoid them, so I'd say this would be a change for the better.

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

3 participants