Файзуллов Айрат Рафагатович 530 группа ExceptionTree 12452
Попова Полина Дмитриевна, 441/2 группа ExceptionTree 12090
f1class ExceptionTree:f1class ExceptionTree:
22
3    def __init__(self):3    def __init__(self):
n4        self.cache = {1: type('Exception-1', (Exception,), {'n': 1})}n4        self.exceptions = {1: type('Exception-1', (Exception,), {'n': 1}
 >)}
55
6    def __call__(self, index):6    def __call__(self, index):
n7        if index in self.cache:n7        if index in self.exceptions:
8            return self.cache[index]8            return self.exceptions[index]
9        parent_index = index // 29        parent_index = index // 2
10        parent_exception = self(parent_index)10        parent_exception = self(parent_index)
t11        new_exception = type(f'Exception-{index}', (parent_exception,), t11        exception_class = type(f'Exception-{index}', (parent_exception,)
>{'n': index})>, {'n': index})
12        self.cache[index] = new_exception12        self.exceptions[index] = exception_class
13        return new_exception13        return exception_class
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op