While searching for something, I ran into the following question:
Python - Can I access the object who call me?Python - Can I access the object who call me?
The post has a number of answers.
One of the answersOne of the answers reads:
Due to a change in the original question
Maybe if you change the otherFunction method signatureclass A: def callFunction(self, obj): obj.otherFunction(self) class B: def callFunction(self, obj): obj.otherFunction(self) class C: def otherFunction(self,other): print "other called"
class A:
def callFunction(self, obj):
obj.otherFunction(self)
class B:
def callFunction(self, obj):
obj.otherFunction(self)
class C:
def otherFunction(self,other):
print "other called"
The answer has a couple of upvotes too.
I'm trying to understand what purpose does an answer serve in such case? Should an obviously incorrect answer that's been striked out by the OP remain there or should it have been deleted?
What should be done in such cases? Ignore and move on?