enthought/traitsui — comment on commit a44361092424d752e1a494fc207f6a6639cad4cd
File: traitsui/editor.py line 135
By sccolbert:

-1. This is very brittle and will break if we ever change the exception message. The better way to do this is to check the type of the trait:

if self.object.trait(self.name).trait_type == 'even': ....