📜  YAMLLoadWarning:不推荐在没有 Loader=... 的情况下调用 yaml.load(),因为默认的 Loader 是不安全的.请阅读 https: msg.pyyaml.org load 了解完整详情. - Python 代码示例

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

代码示例1
# YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. 
# Please read https://msg.pyyaml.org/load for full details.

import yaml

f = open(filaname_path, 'r')   
yaml.load(f, Loader=yaml.FullLoader)
f.close()