offu/WeRoBot

def to_text(value, encoding="utf-8") -> str: 显示语法错误

liukefu2050 opened this issue · 1 comments

def to_text(value, encoding="utf-8") -> str:
if isinstance(value, str):
return value
if isinstance(value, bytes):
return value.decode(encoding)
return str(value)

Issue tracker 只用于反馈 bug 和 feature request。在提问前请仔细阅读我们的文档,并推荐阅读《提问的智慧》:https://github.com/ruby-china/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md