如果您添加一项新功能,可以首先在沙箱里(完全脱离了应用程序的其余部分)进行测试,查看它作为单个函数的行为。
If you're adding a new function, try it out first in a sandbox-preferably completely outside the rest of the application-to see it behave as a single function.
包装现有的php函数而不添加或补充现有的功能,是完全不能接受的。
Wrapping existing PHP functions without adding or complementing existing functionality is a strict no-no.
作为一个python函数,decorator完全可以实现其他Python代码所实现的任何功能。
A decorator, being a Python function, can do absolutely anything other Python code can.
应用推荐