Q:

Get False item from python list of dict?

I have list of python dicts based on class which contains field status. How to "sum" number of items == False? My approach is to check size of list then subtract sum of items == True from list. It works, but is it possible to sum False elements at once (list.count(False))?
Code which works fine:
def get_errors(self):
    return len(self.container) - sum(item['status'] for item in self.container)

How to bypass subtract? Something:
sum(item['status'] for item in self.container if not item)    # if item == False

A:

Just count them. Add 1 for every false item
 sum(1 for item in self.container if item['status']==False)

Or, you could do the complementary of what you're doing
 sum(not item['status'] for item in self.container)

