class ref:

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

def get(self):
    return self.obj

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)
Моделирование указателей в Python для арифметики