twisted Resource object render_Post如何在某些d之后返回特定值

2024-10-02 08:27:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我应该写一些这样的代码:

class SomePage(Resource):
    def render_GET(self, request):
        d = DoSomeQuery()
        # if d run success
        # return "success"
        # if d fails
        # return "fail"

我的意思是render_GET函数的返回值取决于延迟结果。在

我怎么能做到呢?在


Tags: run代码selfgetreturnifrequestdef

热门问题