Мелия Ереджепова, 318 группа NegExtender 12088 | Ворошилова Ксения Михайловна 318 NegExtender 12097 | ||||
---|---|---|---|---|---|
f | 1 | class NegExt: | f | 1 | class NegExt: |
2 | 2 | ||||
3 | def __neg__(self): | 3 | def __neg__(self): | ||
n | 4 | parr = self.__class__ | n | 4 | f = self.__class__ |
5 | try: | 5 | try: | ||
n | 6 | return parr(super().__neg__()) | n | 6 | return f(super().__neg__()) |
7 | except: | 7 | except: | ||
8 | try: | 8 | try: | ||
n | 9 | return parr(self[1:-1]) | n | 9 | return f(self[1:-1]) |
10 | except: | 10 | except: | ||
t | 11 | return parr(self) | t | 11 | return f(self) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|