def _texttype(text):
    if isinstance(text, str):
        return text
    elif isinstance(text, unicode):
        return str(text)   # default encoding
    else:
        raise TypeError("str or unicode expected, got a '%s' object"
                        - (type(text).__name__,))
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/cffi-1.5.2/demo/_curses.py/_texttype/operator `%` -> `-`