(cls)
return cls
Decorator to implement the correct str() function.
Decorator to implement the correct str() function.
Decorator to implement the correct str () function .
def add_str(cls):
    """Decorator to implement the correct str() function."""
    try:
        cls.__str__ = cls.__unicode__
    except AttributeError:
        pass
    return cls
def add_str ( cls ) : try : cls . __str__ = cls . __unicode__ except AttributeError : pass return cls