title: How can I find the number of arguments of a Python function?
body: <p>How can I find the number of arguments of a Python function? I need to know how many normal arguments it has and how many named arguments.</p>
  
  <p>Example:</p>
  
  <pre><code>def someMethod(self, arg1, kwarg1=None):
      pass
  </code></pre>
  
  <p>This method has 2 arguments and 1 named argument.</p>