def set(self, obj):
    self.obj = obj

def __str__(self):
    return self.obj.__str__()

def __add__(self, other):
    while isinstance(other, ref):
        other = other.obj
return self.obj.__add__(other)
a = ref(1.22)
b = ref(a)
print(a)
print(b)
print(a + b)
Simulating Pointers in Python for arithmetic