Горбачёв Алексей Валериевич, 515 группа MetaBool 16702 | Казимагамедов Тагир 424 MetaBool 16750 | ||||
---|---|---|---|---|---|
f | 1 | class empty(type): | f | 1 | class empty(type): |
2 | 2 | ||||
3 | def __init__(cls, name, parents, ns, **kwds): | 3 | def __init__(cls, name, parents, ns, **kwds): | ||
4 | 4 | ||||
n | 5 | def _bool(self): | n | 5 | def __bool__(self): |
6 | for key, val in self.__dict__.items(): | 6 | for _, val in self.__dict__.items(): | ||
7 | if not val: | 7 | if not val: | ||
8 | return False | 8 | return False | ||
9 | return True | 9 | return True | ||
t | 10 | cls.__bool__ = _bool | t | 10 | cls.__bool__ = __bool__ |
11 | return super().__init__(name, parents, ns) | 11 | return super().__init__(name, parents, ns) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|