Hello,
Hope the title isn't to confusing wasn't sure how I should put it. I wonder if it's possible for the base class to know which method of the derived class called one of it's methods.
Example:
class Controller(object):
def __init__(self):
self.output = {}
def output(self, s):
method_that_called_me = #is it possible?
self.output[method_that_called_me] = s
class Public(Controller):
def about_us(self):
self.output('Damn good coffee!')
def contact(self):
self.output('contact me')
So is it possible for the output method to know which method from the Public class called it?