title: *args, **kwargs in jinja2 macros
body: <p>How are extra args &amp; kwargs handled for a Jinja2 macro? The documentation isn't exactly clear offhand.</p>
  <p>For example, this is clearly wrong:</p>
  <pre><code>{% macro example_1(one, two, **kwargs) %}
      do macro stuff
  {% endmacro %}
  </code></pre>
  <p>which results in</p>
  <pre><code>jinja2.exceptions.TemplateSyntaxError
  
  TemplateSyntaxError: expected token 'name', got '**'
  </code></pre>
  <p>The <a href="http://jinja.pocoo.org/docs/templates/#macros" rel="noreferrer">documentation</a> says:</p>
  <blockquote>
  <p><em>kwargs</em></p>
  <p>Like <em>varargs</em> but for keyword arguments. All unconsumed keyword arguments are stored in this special variable.</p>
  </blockquote>
  <p>Unfortunately, any combo of extra keyword arguments is an error,</p>
  <pre><code>{% macro example_2(one, two) %}
      do macro stuff
  {% endmacro %}
  
  {{ example_2(one, two, test='test') }}
  
  TypeError: macro 'example_2' takes no keyword keyword argument 'test'
  </code></pre>
  <p>I have no examples and am not poking about in the Jinja2 source code atm. The documentation isn't clear to me at this point. Any thoughts appreciated.</p>