

@trollius.coroutine
def onMessage(self, payload, isBinary):
    if (not isBinary):
        x = json.loads(payload.decode('utf8'))
        try:
            res = (yield self.slowsquare(x))
        except Exception as e:
            self.sendClose(1000, 'Exception raised: {0}'.format(e))
        else:
            res.sendMessage(json.dumps(res).encode('utf8'))

dataset/ETHPy150Open crossbario/autobahn-python/examples/asyncio/websocket/slowsquare/server_py2.py SlowSquareServerProtocol.onMessage/VarMisuse@84/107 `self`->`res`