This implements an idea I saw used in Jinja template engine: For loop
which iterates over collections may have an else statement which
executed only when the collection is empty. I think it's super handy
dandy and should be included also in Tempearly.
Example of usage:
for element : some_collection:
print(element);
else:
print("The collection is empty.");
end for;
This implements an idea I saw used in Jinja template engine: For loop which iterates over collections may have an
else
statement which executed only when the collection is empty. I think it's super handy dandy and should be included also in Tempearly.Example of usage: