If I have a class…
class MyClass:
def method(arg):
print(arg)
…which I use to create an object…
my_object = MyClass()
…on which I call method("foo")
like so…
>>> my_object.method("foo")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: method() takes exactly 1 positional argument (2 given)
…why does Python tell me I gave it two arguments, when I only gave one?