Hello.
I am studying the jinja template engine.
When I got to the “sequence” test, I saw that in the editor it does not work correctly with respect to dictionaries. Or I don’t understand how it works.
Can someone explain?
{% set three = 10 %}
{% set var1 = {s:1, w:3, f:5} %}
{% set var2 = [1, 2, 3, 4, 5] %}
{% set var3 = ['one', 2, three, 4, 5] %}
{% set var4 = ('lemon', 'apple', 'orange', 'watermelon') %}
{% set var5 = 'fgdgdhdhdhdgh' %}
{% set var6 = 100 %}
{{var1 is sequence}}
{{var2 is sequence}}
{{var3 is sequence}}
{{var4 is sequence}}
{{var5 is sequence}}
{{var6 is sequence}}
-> True
True
True
True
True
False
{{var1 is iterable}}
{{var2 is iterable}}
{{var3 is iterable}}
{{var4 is iterable}}
{{var5 is iterable}}
{{var6 is iterable}}
-> True
True
True
True
True
False
{{var1 is mapping}}
{{var2 is mapping}}
{{var3 is mapping}}
{{var4 is mapping}}
{{var5 is mapping}}
{{var6 is mapping}}
-> True
False
False
False
False
False