title: Default arguments with *args and **kwargs
body: <p>In <strong>Python 2.x</strong> (I use 2.7), which is the proper way to use default arguments with <code>*args</code> and <code>**kwargs</code>?<br>
  I've found a question on SO related to this topic, but that is for <strong>Python 3</strong>:<br>
  <a href="https://stackoverflow.com/questions/9872824/calling-a-python-function-with-args-kwargs-and-optional-default-arguments">Calling a Python function with *args,**kwargs and optional / default arguments</a></p>
  
  <p>There, they say this method works:</p>
  
  <pre><code>def func(arg1, arg2, *args, opt_arg='def_val', **kwargs):
      #...
  </code></pre>
  
  <p>In 2.7, it results in a <code>SyntaxError</code>. Is there any recommended way to define such a function?<br>
  I got it working this way, but I'd guess there is a nicer solution.</p>
  
  <pre><code>def func(arg1, arg2, *args, **kwargs):
      opt_arg ='def_val'
      if kwargs.__contains__('opt_arg'):
          opt_arg = kwargs['opt_arg']
      #...
  </code></pre>