Added __bool__ method for Python 3 compatibility
Test on Python 3.2