摘要:
There should be one—--and preferably only one –--obvious way to do it.
----摘自The Zen of Python, by Time Peters
在正式进入 Decorator话题之前,请允许我讲一个小故事。
在最近的项目开发过程中,一位同事在读我的代码的时候,提出质疑,为什么同样的验证代码要重复出现在服务接口中呢?
如某服务接口是游戏中的玩家想建造建筑: 阅读全文