def _format_arg(self, name, spec, value):
    assert (value is not None)
    if (name in self.input_spec.bool_or_const_traits):
        if (isinstance(value, bool) and value):
            return spec.argstr
        elif (isinstance(value, bool) and (not value)):
            raise ValueError(('Does not make sense to specify %s=False' % (name,)))
        elif isinstance(value, float):
            return ('%s -const %s' % (spec.argstr, value))
        else:
            raise ValueError(('Invalid %s argument: %s' % (name, value)))
    return super(Math, self)._format_arg(name, spec, value)
def _format_arg(self, name, spec, value):
    assert (value is not None)
    if (name in self.input_spec.bool_or_const_traits):
        if (isinstance(value, bool) and value):
            return spec.argstr
        elif (isinstance(value, bool) and (not value)):
            raise ValueError(('Does not make sense to specify %s=False' % (name,)))
        elif isinstance(value, float):
            return ('%s -const %s' % (spec.argstr, value))
        else:
            raise ValueError(('Invalid %s argument: %s' % (name, value)))
    return super(Math, self)._format_arg(name, spec, value)