Python 编程的常见陷阱与奇巧淫技

Posted on Tue 27 January 2026 in Tech • Tagged with python, programming, tips, traps, best-practices

Python 入门容易精通难。这篇文章整理了 10 大经典陷阱(可变默认参数、闭包绑定、浮点精度、GIL...)和 10 小窍门(海象运算符、collections、itertools...),附带工程建议和 Checklist,帮你写出稳定、高效、可维护的 Python 代码。


Continue reading

从过程式、命令式到声明式:编程与运维的一次“权力转移”

Posted on Tue 27 January 2026 in Method • Tagged with Programming, DevOps, Declarative, Kubernetes, Terraform, GitOps, Infrastructure as Code

过程式是“我来一步步做”,命令式是“你按我说的做”,声明式是“我只说我想要什么,怎么做到你自己想办法”。这背后不是语法之争,而是复杂系统时代的协作方式升级。


Continue reading