关于fileobject.encoding的文档提到它可以是None,如果是这样的话,就会使用“系统默认编码”。
None
我该如何知道这个编码是什么呢?
你应该使用 sys.getdefaultencoding() 这个方法。
sys.getdefaultencoding()