I am having trouble getting the following code to work. The func function should just return the self.test value, but the code doesn't seem to do the job. I want self.test as the default value for the function.
class model():
def __init__(self):
self.test=1
def func(self, test=self.test):
return(test)
model=model()
model.func()