You are trying to access your output method (which is an instance method) as a class method. The message is coming up because the first parameter self is the instance object, so you passing the class as the first parameter will actually change the content of what self should have as an instance object. That is what the message is trying to tell you. So, what you actually should be doing is call the method as an instance method:
Parent().output(self.text)
Based on what you were doing, if you check the repr and contents of the object of self inside the output method, you get this:
def output(self, param1):
print(repr(self))
print(dir(self))
print(param1)
Using this method of calling: Parent.output(Parent, self.text)
<class '__main__.Parent'>
[
'Child', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__',
'__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__',
'__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',
'__subclasshook__', '__weakref__', 'output', 'run'
]
As you can see, you do not have an instance of Parent in your self.
Now, if you call it as an instance method: Parent().output(self.text)
<__main__.Parent object at 0x1021c6320>
[
'Child', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__',
'__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__',
'__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__',
'__weakref__', 'child', 'output', 'run', 'text'
]
As you can see, you now have a Parent object and if you look at the contents of the object, you would have what you would expect from your instance properties.