If I have the object
>>> class example_class():
>>> def example_function(number, text = 'I print this: '):
>>> print text, number
I can change the example_function input parameter
>>> example_instance = example_class()
>>> print example_instace.example_function(3, text = 'I print that: ')
Now I would like to always use I print that:
every time I use example_instace
. Is it possible to change the default value of text
so that I get this behavior:
>>> example_instace = example_class()
>>> print example_instance.example_function(3)
I print this: 3
>>> default_value(example_instance.text, 'I print that: ')
>>> print example_instance.example_function(3)
I print that: 3