summary sth about python.
1. prefer intrinic loop to explicit loop
2. run expensive instruction through c
3. not use global viariable
4. donot repeat you self
5. donot write long method (function)
use table driven.
1. prefer intrinic loop to explicit loop
2. run expensive instruction through c
3. not use global viariable
4. donot repeat you self
5. donot write long method (function)
use table driven.
本文总结了Python编程中的几个重要原则:1. 优选内联循环而非显式循环;2. 利用C语言运行昂贵指令;3. 避免使用全局变量;4. 遵循DRY(Don't Repeat Yourself)原则;5. 避免编写过长的方法(函数),推荐使用表格驱动的设计方式。
1417

被折叠的 条评论
为什么被折叠?



