confused about python decorators. When/how are they called?
This question already has an answer here:
@memoize
def fibonacci(n):
...
Is the same thing as
def fibonacci(n):
...
fibonacci = memoize(fibonacci)
See this stack overflow answer for a detailed explanation on how decorators work.
链接地址: http://www.djcxy.com/p/23816.html上一篇: 自定义路由装饰器