2019年6月19日
摘要: python 之禅 The Zen of Python, by Tim Peters Beautiful is better than ugly. 优美胜于丑陋(Python以编写优美的代码为目标) Explicit is better than implicit. 明了胜于晦涩(优美的代码应当是明 阅读全文
posted @ 2019-06-19 18:30 _albert 阅读(250) 评论(1) 推荐(1) 编辑
摘要: 关键字 global nonlocal global 声明全局变量 如果全局中 存在声明的变量 那么就使用;如果不存在,就创立一个 在局部 , 有使用全局变量的权限,但是没有更改指向的权力 预编译 nonlocal 使用上一层 同时在locals里存在 可变默认参数 当默认参数为可变数据类型时,程序 阅读全文
posted @ 2019-06-19 15:10 _albert 阅读(121) 评论(0) 推荐(0) 编辑