f | class empty(type): | f | class empty(type): |
| | | |
n | def __new__(metacls, name, parents, ns, **kwargs): | n | def __new__(metacls, name, parents, namespace, **kwargs): |
| | | |
n | def new_bool(self): | n | def __bool__(self): |
| for i in self.__dict__.values(): | | for value in self.__dict__.values(): |
| if not i: | | if not value: |
| return False | | return False |
| return True | | return True |
t | ns['__bool__'] = new_bool | t | namespace['__bool__'] = __bool__ |
| return super().__new__(metacls, name, parents, ns) | | return super().__new__(metacls, name, parents, namespace) |