Jinja: How to distinguish between 0 and False?

This is really a generic Jinja question. I have a condition where I want to detect 0 but not False.

{% set x = 0 %}
{% set y = False %}
{{ x == y }} (True)
{{ y is number }} (True)

It seems that False is treated as a number except for display purposes? Is there some way to tell them apart?

1 Like

OK, fair enough. boolean is a number, but number is not a boolean.