If I have a class variable being passed to a function, is there a way that I can get the class that the variable is from?
class someclass:
def __init__(self):
self.somevariable='somevalue'
def somefunction(self):
print('gotta get here')
def someotherfunction(somevariable):
somevariable.needparentclasshere.somefunction()
myclass=someclass()
someotherfunction(myclass.somevariable)#this needs to print 'gotta get here'