For the error:
TypeError: takes exactly 1 argument (2 given)
With the following class method:
def extractAll(tag): ...
and calling it:
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
self into the method prototype but I wanted to know the reasoning behind the error.
Am I getting it because the act of calling it via
e.extractAll("th") also passes in
self as an argument? And if so, by removing the
self in the call, would I be making it some kind of class method that can be called like