我刚刚用python创建了一个字典。
stb_info = self.stb_type()
print type(stb_info) #The output gives me dict
当我想为每组运行tread函数时
for group_no, shelves in stb_info:
self.thread_function(group_no, shelves)
我得到以下错误:
TypeError: 'long' object is not iterable
那么,我怎样才能解决这个问题呢?
Tags:
尝试
stb_info.items()
。只是在dict上迭代它的键,所以它试图将一个键(长的)解包成两部分,这是不可能的。相关问题 更多 >
编程相关推荐