Антон Щербаков, 523 MetaBool 17216 | Алкисев Илья, 517 группа MetaBool 17195 | ||||
---|---|---|---|---|---|
f | 1 | class empty(type): | f | 1 | class empty(type): |
2 | 2 | ||||
3 | @staticmethod | 3 | @staticmethod | ||
t | 4 | def __new__(mcls, name, pids, ns, **kwds): | t | 4 | def __new__(metacls, name, parents, ns, **kwds): |
5 | to_return = super().__new__(mcls, name, pids, ns) | 5 | obj = super().__new__(metacls, name, parents, ns) | ||
6 | to_return.__bool__ = lambda self: all(self.__dict__.values()) | 6 | obj.__bool__ = lambda self: all(self.__dict__.values()) | ||
7 | return to_return | 7 | return obj |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|