Using default arguments before positional arguments
<p>I am learning to use positional arguments in python and also trying to see how they work when mixed up with default arguments:-</p>

<pre><code>def withPositionalArgs(ae=9,*args):
    print 'ae= ', ae
    print 'args = ', args


a=1
b=2
c=[10,20]

withPositionalArgs(a,b,c)
</code></pre>

<p>This gives me the output:</p>

<pre><code>ae=  1
args =  (2, [10, 20])
</code></pre>

<p>As you can see, <code>a</code> is considered to be a value passed for <code>ae</code>, and <code>b</code> as well as <code>c</code> are considered to be the positional arguments.</p>

<p>So, I am now trying to assign <code>10</code> for <code>ae</code> while calling <code>withPositionalArgs</code>:</p>

<pre><code>withPositionalArgs(ae=10,b,c)
</code></pre>

<p>But, I can not do it. I get the error:</p>

<pre><code>SyntaxError: non-keyword arg after keyword arg
</code></pre>

<p><strong>My question is:</strong></p>

<p>Am I doing correctly? Is having default argument allowed or a good practice to use before positional arguments in python functions?</p>
