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

Yes, this is fragile. I thought @rkern did it this way because there are multiple trait types that can trigger this (at least Event and Button, and presumably any other Event equivalents that may exist now or in the future.) There must be a robust way to check for this precisely but it would seem to be non-trivial. At least this warrants a FIXME.

(Just for the record, I assume @sccolbert was writing shorthand: I think trait_type is a type, not a string.)