python - AttributeError:“dict_values”对象没有属性“更新”
问题描述
我有问题:“AttributeError:'dict_values'对象没有属性'update'”
我该如何解决?
代码 :
queue = Queue()
liste = glob(f+'/2013/*.xml')[:30]
# l1 = Manager().list
# l2
# # for fic in liste :
# grosse_bc = main(fic,listeIngr,listeAll,grosse_bc)
# for i in range (50):
# main(liste[i],listeIngr,listeAll,grosse_bc)
while len(liste) >= 15 :
for i in range(15):
p = multiprocessing.Process(target=main, args=(liste[i],listeIngr,listeAll,queue,grosse_bc))
jobs.append(p)
p.start()
liste = liste[14:]
print("fini !")
# for p in jobs :
# # grosse_bc.update(p)
# p.join()
# print("join fini !")
gros_dico = []
# queue.join()
x = 0
tgd = {}
while not queue.empty():
# gros_dico.append(queue.get())
for elem in queue.get():
if elem not in tgd :
tgd[elem] = queue.get().values()
else :
tgd[elem].update(queue.get().values())
# print(gros_dico)
# for elem in gros_dico :
# tgd.update(elem)
pprint(tgd)
我想连接队列输出的所有字典。最佳莱昂
解决方案
推荐阅读
- php - PHP order by 不按顺序显示数据
- reactjs - 如何使用此操作功能获取用户信息?
- android - MvxCachingFragmentActivity 被什么取代了?
- javascript - 无法使用 d3.js 在气泡图中显示工具提示
- google-analytics - 如何链接数百个域而不在 Google Analytics 的链接器属性中列出它们?
- node.js - 如何从包含我的对象的另一个类中调用函数?
- javascript - 此代码示例中此参数中所指的“匹配”是什么
- akka-stream - akka-streams 是否支持集群?如果是,请分享示例
- django - 向缺少用户的 Django Rest APIView 发布请求(令牌身份验证)
- bixby - Bixby 中是否有 DateTime 的原始类型?