对于@ def' def'之上的其他函数意味着什么?在Python中?

时间:2016-04-11 17:51:04

标签: python function-definition

我是python的新手,请原谅我这是一个愚蠢的问题。

我遇到了在def new_function()语句之上有@other_functions的python代码。有人可以解释一下它的含义吗?

如本例所示:

from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods


@csrf_exempt
@require_http_methods(["post"])
def my_new_function(request):
  ....
  ....

0 个答案:

没有答案