cms-sw/cmssw — pull request #1758 by Dr15Jones (2013-12-10 17:27:19+00:00)
Title: Have python parameter objects implement expected boolean conversions

python allows implicit conversion of objects to a boolean. By default, objects always convert to ‘True’. This was unexpected for a ‘cms.bool(False)==True’. By implementing __nonzero__ our objects now implicitly convert as expected. We also note that our list based parameters were already doing the proper conversion since they inherited from python’s built in list class.