Илья Лысцов, 321 группа MetaBool 16700 | Бедрин Павел Александрович, 428 группа MetaBool 16903 | ||||
---|---|---|---|---|---|
f | 1 | class empty(type): | f | 1 | class empty(type): |
2 | 2 | ||||
3 | def __call__(cls, *args, **kwargs): | 3 | def __call__(cls, *args, **kwargs): | ||
4 | obj = super().__call__(*args, **kwargs) | 4 | obj = super().__call__(*args, **kwargs) | ||
t | 5 | cls.__bool__ = lambda self: all((i for i in self.__dict__.values())) | t | 5 | cls.__bool__ = lambda x: all((value for value in x.__dict__.values())) |
6 | return obj | 6 | return obj |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|