That's because both are Jinja reimplementations (given the name, I expect Swig is a JS version of Twig[0], itself a PHP implementation of Jinja, and originaly started by Armin Ronacher — Jinja's author[1][2])
[0] http://twig.sensiolabs.org
[1] https://github.com/mitsuhiko/twig
[2] http://fabien.potencier.org/article/34/templating-engines-in...