class Data:
def __init__(self, date):
self.date = date
@classmethod
def extract(cls, date):
temp = cls(str(date).split('-'))
day, month, year = int(temp[0]), int(temp[1]), int(temp[2]) # ошибка здесь
# day, month, year = (cls(day)), cls(month), cls(year)
return day, month, year
@staticmethod
def validation(day, month, year):
if 0 > year > 2020:
if 1 > month > 12:
if 1 > day > 31:
print(f'Введена дата: {day}.{month}.{year}')
else:
print('Неверный день!')
else:
print('Неверный месяц!')
else:
print('Неверный год!')
date_1 = Data(25-9-1990)
print(date_1.extract(25-9-1990))