一直在尝试阅读文档和查看在线示例,但我的队列仍然没有返回任何结果。在
from collections import defaultdict
from Queue import Queue
-- in my init
self.tickerPrices = dict()
queue = Queue(maxsize=5)
queue.put((0.00097073, 67689.70942763))
self.tickerPrices['a'] = queue
def appendToTickerDict(self, tickerid, askprice, volume):
if(tickerid in self.tickerPrices):
tickerQueue = self.tickerPrices[tickerid].put((askprice, volume)) --RETURNS NONE
tickerQueue返回None。在这一步之前,我测试了它,发现如果我在init中向这个队列添加了一些东西,那么在执行这段代码之前,它会显示为.get
任何提示都会很有帮助。在
您可以看到python语言引用expression-statements。在
相关问题 更多 >
编程相关推荐