Кленин Максим Дмитриевич, 418 группа MetaBool 16694 | Алкисев Илья, 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, parents, ns, **kwds): | t | 4 | def __new__(metacls, name, parents, ns, **kwds): |
5 | cls = super().__new__(mcls, name, parents, ns) | 5 | obj = super().__new__(metacls, name, parents, ns) | ||
6 | cls.__bool__ = lambda self: all(self.__dict__.values()) | 6 | obj.__bool__ = lambda self: all(self.__dict__.values()) | ||
7 | return cls | 7 | return obj |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|