摘要: 背景:想要通过读取配置文件动态生成方法 实践1 使用关键字exec实现生成方法,参考 https://www.cnblogs.com/wjlv/p/14276827.html m = """ def fn(a,b): c=2 s=a+b+c return s """ exec(m) print(fn 阅读全文
posted @ 2021-02-20 10:03 唐大侠的小迷弟 阅读(377) 评论(0) 推荐(0) 编辑