>>> class x: ... def __init__(self, n): ... self.__n = n ... def get(self): ... return self.__n ... def set(self, n): ... self.__n = n ... >>> y = x(3) >>> y.get() 3 >>> y.set(4) >>> y.get() 4 >>>