Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
Alternatively, a function object may be used. Small function objects will not incur a memory allocation. The follow code declares and sets a function object as a decorator:也可以使用函数对象。小型函数对象不会产生内存分配。以下代码声明并设置一个函数对象作为修饰器: