Is it possible to get all attributes of some class or object? I have a class with many attributes and I want to make a function/method which returns all attributes of object equals to None.
Since there is many of these attributes I have to avoid writing all of them into the function.
Something like this:
def get_all_empty_attributes(self):
for attr in self.attributes.names:
if self.attr==None:
yield attr
Is it possible to do using builtin functions?