Is this Python 2.x or Python 3.x? For Python 2.x you are looking to override __nonzero__ instead.
class test:
def __nonzero__(self):
return False
Is this Python 2.x or Python 3.x? For Python 2.x you are looking to override __nonzero__ instead.
class test:
def __nonzero__(self):
return False