Interesting 'takes exactly 1 argument (2 given)' Python error
<p>For the error:</p>

<pre><code>TypeError: takes exactly 1 argument (2 given)
</code></pre>

<p>With the following class method:</p>

<pre><code>def extractAll(tag):
   ...
</code></pre>

<p>and calling it:</p>

<pre><code>e.extractAll("th")
</code></pre>

<p>The error seems very odd when I'm giving it 1 argument, the method should take only 1 argument, but it's saying I'm not giving it 1 argument....I know the problem can be fixed by adding <code>self</code> into the method prototype but I wanted to know the reasoning behind the error.</p>

<p>Am I getting it because the act of calling it via <code>e.</code>extractAll("th") also passes in <code>self</code> as an argument? And if so, by removing the <code>self</code> in the call, would I be making it some kind of class method that can be called like <code>Extractor.extractAll("th")</code>?</p>
