def _fmt_arff_val(self, fval):
        if fval is None:
            return '?'
        elif isinstance(fval, (bool, compat.integer_types)):
            return '%s' % fval
        elif isinstance(fval, float):
            return '%r' % fval
        else:
            return '%r' % fval
dataset/ETHPy150Open nltk/nltk/nltk/classify/weka.py/ARFF_Formatter._fmt_arff_val/original