Балтаев Глеб Иркинович 341 ExceptionTree 12187
Даулетбек Досай 404 группа (КФ) ExceptionTree 12888
f1class ExceptionTree:f1class ExceptionTree:
22
3    def __init__(self):3    def __init__(self):
4        self.exceptions = {1: type('Exception1', (Exception,), {'n': 1})4        self.exceptions = {1: type('Exception1', (Exception,), {'n': 1})
>}>}
55
6    def __call__(self, n):6    def __call__(self, n):
7        if n not in self.exceptions:7        if n not in self.exceptions:
t8            parent = n // 2t8            parent_n = n // 2
9            if parent not in self.exceptions:9            if parent_n not in self.exceptions:
10                self(parent)10                self(parent_n)
11            self.exceptions[n] = type(f'Exception{n}', (self.exceptions[11            self.exceptions[n] = type(f'Exception{n}', (self.exceptions[
>parent],), {'n': n})>parent_n],), {'n': n})
12        return self.exceptions[n]12        return self.exceptions[n]
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op