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