I have 2 classes with a method called pick_up_phone
.
class Work(object):
def pick_up_phone(self):
make_call()
class Home(object):
def pick_up_phone(self):
make_call()
The function make_call
is not part of the class. How can I print the name of class that instigated the function within the function itself without passing anything to that function?
For example something like...
def make_call()
print(????__.class__.__name__)???? <--- prints Home or Work class