Жангирхан Шаку, 404 NegExtender 12980
Даулетбек Досай 404 группа (КФ) NegExtender 12897
f1class NegExt:f1class NegExt:
22
3    def __neg__(self):3    def __neg__(self):
n4        class_reference = self.__class__n4        cls = self.__class__
5        for ancestor in class_reference.__mro__[1:]:5        for base in cls.__mro__[1:]:
6            if hasattr(ancestor, '__neg__') and callable(ancestor.__neg_6            if hasattr(base, '__neg__') and callable(base.__neg__) and (
>_) and (ancestor is not NegExt):>base is not NegExt):
7                try:7                try:
n8                    neg_result = ancestor.__neg__(self)n8                    result = base.__neg__(self)
9                    return class_reference(neg_result)9                    return cls(result)
10                except TypeError:10                except TypeError:
11                    continue11                    continue
12        if hasattr(self, '__getitem__'):12        if hasattr(self, '__getitem__'):
13            try:13            try:
n14                sliced_part = self[1:-1]n14                sliced = self[1:-1]
15                return class_reference(sliced_part) if not isinstance(se15                return cls(sliced) if not isinstance(self, dict) else cl
>lf, dict) else class_reference(sliced_part.items())>s(sliced.items())
16            except (TypeError, IndexError, KeyError):16            except (TypeError, IndexError, KeyError):
17                pass17                pass
t18        return class_reference(self) if not isinstance(self, dict) else t18        return cls(self) if not isinstance(self, dict) else cls(self.ite
>class_reference(self.items())>ms())
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op