Skip to content

Update p12_using_decorators_to_patch_class_definitions.rst #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
某种程度上来讲,类装饰器方案就显得更加直观,并且它不会引入新的继承体系。它的运行速度也更快一些,
因为他并不依赖 ``super()`` 函数。

如果你系想在一个类上面使用多个类装饰器,那么就需要注意下顺序问题。
如果你想在一个类上面使用多个类装饰器,那么就需要注意下顺序问题。
例如,一个装饰器A会将其装饰的方法完整替换成另一种实现,
而另一个装饰器B只是简单的在其装饰的方法中添加点额外逻辑。
那么这时候装饰器A就需要放在装饰器B的前面。
Expand Down