📜  python unicode 未定义 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:29.654000             🧑  作者: Mango

代码示例1
if isinstance(unicode_or_str, str):
    text = unicode_or_str
    decoded = False
else:
    text = unicode_or_str.decode(encoding)
    decoded = True