Change History (7)

Been confronted to the same issue today. On one side, the object can workaround this by defining the __nonzero__ method (see ​http://docs.python.org/reference/datamodel.html#object.__len__). On the other side, the test here is not to know if the object evaluates to True or False, but if it can be queried for the attribute.