class Calendar:
__slots__ = ('D', 'M', 'Y')
def __init__(self, d = 0, m = 0, y = 0):
self.D = d
self.M = m
self.Y = y
print(self)
def __setattr__(self, key, value):
if isinstance(value, int):
print('ГОТОВО')
else:
raise AttributeError
def __getattr__(self, item):
print('ГОТОВО2')
c = Calendar(1, 12, 2004)