Михаил Успенский 616 ВМК МГУ MetaBool 16855 | Кяжин Никита Олегович, 321 группа MetaBool 17032 | ||||
---|---|---|---|---|---|
f | 1 | class empty(type): | f | 1 | class empty(type): |
2 | 2 | ||||
t | 3 | def __new__(metacls, name, bases, class_dict): | t | 3 | def __new__(c, n, b, d): |
4 | class_dict['__bool__'] = lambda self: all((value for value in self.__dict__.values())) | 4 | d['__bool__'] = lambda self: all((value for value in self.__dict__.values())) | ||
5 | return super().__new__(metacls, name, bases, class_dict) | 5 | return super().__new__(c, n, b, d) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|