does objects have its methods or invoke them from superclass in python?
for example:
and if the latter is true why we need to self parameter in definition class's functions
for example:
class tst(): def __init__(self,name,family): self.name=name self.family=family def fun(self,a,b): print(a+b) newtst=tst("myname","my family") tst.fun(newtst,3,5) newtst.fun(3,5)in the code above does newtst object invoke fun function from tst class or it has own method and run it directly
and if the latter is true why we need to self parameter in definition class's functions