TypeError: method() takes 1 positional argument but 2 were given

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 … Read more