Well the question says it all, I've been wanting to use {% set %} {% endset %} with jinja2 for a while - it's available at 2.8
I'm interested in alternatives too, if anyone has any
It's for a very specific use case, where I replace sections of translated phrases with html tags at templates - for example, "A [S]Tag[/S]" becomes "A <span style='gg'>Tag</span>" etc.
Storing raw html in variables is practical, otherwise putting htmls into jinja2 strings gets complicated due to quotation marks
Without the set/endset, macro's are a nice alternative, but an overkill