0
我在调试一个复杂的问题,需要看看名为context
的结构化变量的内容。尝试使用此代码打印失败:Python 3的可靠'print(repr(context))'
print(repr(context))
随着错误消息:
UnicodeEncodeError: 'charmap' codec can't encode character '\xb6' in position
2336: character maps to <undefined>
什么是打印结构变量在屏幕上进行调试在Python 3可靠的方法是什么?
我应该用我的更换打印'(再版(上下文))'? –
Python 3只有魔法。但它的工作。谢谢。 =) –