1
ryd994 2014-11-23 14:20:39 +08:00 via Android
return()吧
|
2
ryd994 2014-11-23 14:22:13 +08:00 via Android
我错了,没事了
|
3
p8p8 OP @ryd994 return()吧 ??
result = yield momoko.Op(self.db.execute, query, args, cursor_factory=psycopg2.extras.DictCursor) return result 这里改成 result = yield momoko.Op(self.db.execute, query, args, cursor_factory=psycopg2.extras.DictCursor) return() 这样吗? 我怎么感觉你的回答好虚啊。。。不过还是谢谢你。 |
5
iceout 2014-11-23 14:28:27 +08:00
http://tornado.readthedocs.org/en/branch3.2/gen.html#decorators
文档中写了。。。 Coroutines may “return” by raising the special exception Return(value).In Python 3.3+, it is also possible for the function to simply use the return value statement (prior to Python 3.3 generators were not allowed to also return values). |
7
iceout 2014-11-23 19:00:10 +08:00
|