title: Default values for positional function arguments in Python?
body: <p>I was going trough some code, and I came across the following function:</p>
  
  <pre class="lang-py prettyprint-override"><code>def foo(self, arg1=1, *, arg2=2):
      pass
  </code></pre>
  
  <p>I was surprised to see keyword arguments on the left side of the <code>*</code>, the positional arguments. I notice then that I can call <code>foo</code> in both of the following ways:</p>
  
  <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; foo(1)
  &gt;&gt;&gt; foo(arg1=1)
  </code></pre>
  
  <p>I think I would be expecting the second call to fail as I am calling <code>foo</code> using a named argument by providing the keyword <code>arg1</code>.</p>
  
  <p>With that said, am I using positional arguments in both scenarios, or is the second call to <code>foo</code> a named argument?</p>