有没有时,你应该实现一个python约定__str__()对__unicode__().我已经看到类的覆盖__unicode__()频率高于__str__()它但看起来并不一致.当一个与另一个相比更好的时候是否有特定的规则?是否有必要/良好做法同时实施?
__str__()
__unicode__()
python string unicode conventions
conventions ×1
python ×1
string ×1
unicode ×1