Жангирхан Шаку, 404 ExceptionTree 12590
Арсен Жуматай,304 ExceptionTree 12615
f1class ExceptionTree:f1class ExceptionTree:
22
3    def __init__(self):3    def __init__(self):
4        self.exceptions = {1: type(f'Exception1', (Exception,), {'n': 1}4        self.exceptions = {1: type(f'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 = n // 2t8            parent = n // 2
9            parent_exc = self(parent_n)9            parent_exc = self(parent)
10            self.exceptions[n] = type(f'Exception{n}', (parent_exc,), {'10            self.exceptions[n] = type(f'Exception{n}', (parent_exc,), {'
>n': n})>n': n})
11        return self.exceptions[n]11        return self.exceptions[n]
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op