Q:

Python Enum: how to make enum member to behave like zero?

I have enum and I'd like some constants acts like 0. It's not the case by default (what is strange by itself). I have tried to bind nonzero method to enum member directly, but it's not called in if statment. What is going on!? And is there clear way to make FOO behave like 0? 
from enum import Enum

class A(Enum):
    FOO = 0
    BAR = 1

if A.FOO: print 'foo!'
if A.BAR: print 'bar!'

setattr(A.FOO, '__nonzero__', (lambda self:False).__get__(A.FOO, A.FOO.__class__))

if A.FOO: print 'foo!'
print A.FOO.__nonzero__()

Output
foo!
bar!
foo!
False

Upd: for Python 2.7 zvone's solution looks like this and works fine:
from enum import Enum

class A(Enum):
    FOO = 0
    BAR = 1

    def __nonzero__(self): return self!=A.FOO

if A.FOO: print 'foo!'
if A.BAR: print 'bar!'

A:

There are several problems here:

there is no enum in Python 2.7 (the question is tagged as 2.7) - see enum doc; perhaps you are using the enum34 backport?
there is enum in Python 3.4 and later, but there is no __nonzero__ there (Python 3 uses __bool__ instead)
The __nonzero__/__bool__ method, if it existed, would have to be defined on the class and not on the instance

So, finally, there is a solution in Python 3:
class A(Enum):
    FOO = 0
    BAR = 1

    def __bool__(self):
         # only return False for A.FOO
         return self != A.FOO

And the solution for Python 2:
class A(Enum):
    FOO = 0
    BAR = 1

    def __nonzero__(self):
         # return boolean value of any A
         return bool(self._value_)

