python3
報錯:
報UncodeDecodeError:'gbk' codec can't decode byte的錯誤。(可能是因爲有中文符號)
解決辦法:
增加encoding='UTF-8'
f = open('fileName', encoding='UTF-8')
python3
報錯:
報UncodeDecodeError:'gbk' codec can't decode byte的錯誤。(可能是因爲有中文符號)
解決辦法:
增加encoding='UTF-8'
f = open('fileName', encoding='UTF-8')
class MetaCls(type): def __new__(cls, *args, **kwargs): print("in MetaCls") # return super(Meta