

def _set_value(self, value):
    self._value = value
    if isinstance(value, basestring):
        try:
            self._value = int(value)
        except:
            try:
                self._value = float(value)
            except:
                pass

dataset/ETHPy150Open enthought/traitsui/traitsui/editors/button_editor.py ToolkitEditorFactory._set_value/original