Python 3.7.1
I wrote this class:
How I can create writable reference to a member of the class instance?
I wrote this class:
class Cycler(object): def __init__(self, data): self.data = data def do(self): My_ref = self.data My_ref = 2And now I want create small name to simplify the code. In above code the instance self does not change the value of the variable data (but variable My_ref will now refer to an object of type 'int' with a value of 2).
How I can create writable reference to a member of the class instance?