import math
class Circulo():
__slots__ = ("__raio")
def __init__(self):
super()
self.__raio = None
def get_perimetro(self):
return 2 * math.pi * self.raio
def get_area(self):
return math.pi * self.raio ** 2
@property
def raio(self):
return self.__raio
@raio.setter
def raio(self, x):
self.__raio = x
c = Circulo()
c.raio = 2 # ok
c.lado = 2 # AttributeError
aW1wb3J0IG1hdGgKCmNsYXNzIENpcmN1bG8oKToKICAgIAogICAgX19zbG90c19fID0gKCJfX3JhaW8iKQogICAgCiAgICBkZWYgX19pbml0X18oc2VsZik6CiAgICAgICAgc3VwZXIoKQogICAgICAgIHNlbGYuX19yYWlvID0gTm9uZQogICAgCiAgICBkZWYgZ2V0X3BlcmltZXRybyhzZWxmKToKICAgICAgICByZXR1cm4gMiAqIG1hdGgucGkgKiBzZWxmLnJhaW8KICAgIAogICAgZGVmIGdldF9hcmVhKHNlbGYpOgogICAgICAgIHJldHVybiBtYXRoLnBpICogc2VsZi5yYWlvICoqIDIKICAgIAogICAgQHByb3BlcnR5CiAgICBkZWYgcmFpbyhzZWxmKToKICAgICAgICByZXR1cm4gc2VsZi5fX3JhaW8KICAgIAogICAgQHJhaW8uc2V0dGVyCiAgICBkZWYgcmFpbyhzZWxmLCB4KToKICAgICAgICBzZWxmLl9fcmFpbyA9IHgKICAgICAgICAKYyA9IENpcmN1bG8oKQpjLnJhaW8gPSAyICMgb2sKYy5sYWRvID0gMiAjIEF0dHJpYnV0ZUVycm9y