How can I set the default value in the class definition to one of the class' instance variable?
class SomeClass:
def __init__(self, data):
self.data = data
def do_something(self, data_file=self.data): # Here
# modify the data and return to itself using recursion.
if something:
return self.do_something(data_file)
else:
return data_file