This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tornado.gen | |
class Library(): | |
@tornado.gen.engine | |
def ask(self, question, callback=None): | |
# do a computation that doesn't block for a long time. | |
result = "Why would you want to know about '{0}'".format(question) | |
error = None |