一直在尝试阅读文档并查看在线示例,但我的队列仍然没有返回。
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返回无。在此步骤之前,我对其进行了测试,并看到如果我在初始化中添加了一些东西,它会显示在执行此代码
之前。任何提示都会最有帮助。
您可以看到python语言参考表达式 -