原文:python 2.7版本解决TypeError: 'encoding' is an invalid keyword argument for this function

今天在用yaml处理数据时,由于yaml.load可接收一个byte字符串,unicode字符串,打开的二进制文件或文本文件对象,但字节字符串和文件必须是utf ,utf be或utf le编码的。因此读取数据的时候用了 ...

2017-07-07 15:18 2 62932 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM