def unicode_compatible(cls):
    if not is_py3:
        cls.__unicode__ = cls.__str__
        cls.__str__ = lambda self: self.__unicode__().encode('utf-8')
    return cls
A decorator that defines ``__str__`` and ``__unicode__`` methods
dataset/ETHPy150Open jpvanhal/siilo/siilo/_compat.py/unicode_compatible