Closed iyongliang closed 3 years ago
The original code cannot generate the out.log file; modify the sample file Reference http://book.pythontips.com/en/latest/decorators.html
原代码不能生成 out.log 文件;修改示例文件 参考 http://book.pythontips.com/en/latest/decorators.html
谢谢提醒,不过你的PR的代码是有错误的,在定义myfunc1时,装饰器逻辑就会执行,而这应该是在调用myfunc1才应该执行。
正确的写法我在这个commit里进行了更正:https://github.com/eastlakeside/interpy-zh/commit/39ab713536f27d380a622739b4112bdbca03c4ff
fix example code
The original code cannot generate the out.log file; modify the sample file Reference http://book.pythontips.com/en/latest/decorators.html
原代码不能生成 out.log 文件;修改示例文件 参考 http://book.pythontips.com/en/latest/decorators.html