任务:获取price在self.priceTable给定reqId的输入。
类方法的此代码确实按预期工作:
priceTable = self.priceTable
price = next(filter(lambda priceTable: priceTable['reqId'] == reqId, priceTable), None)
此代码给出了无效的语法错误:
price = next(filter(lambda self.priceTable: self.priceTable['reqId'] == reqId, self.priceTable), None)
那有什么问题?任何替代建议?
慕侠2389804
慕妹3242003
慕运维8079593
相关分类