forcityindownload_dict:forpuidindownload_dict[city]:ifpuidindetail_dict:cate=detail_dict[puid]else:continuefordtindownload_dict[city][puid]:ifdtnotind:d[dt]={}forcateindo...
for city in download_dict:
for puid in download_dict[city]:
if puid in detail_dict:
cate = detail_dict[puid]
else: continue
for dt in download_dict[city][puid]:
if dt not in d:
d[dt] = {}
for cate in download_dict[city][puid][dt]:
if cate not in d[dt]:
d[dt][cate] = {}
d[dt][cate]['count'] = 0
d[dt][cate]['usr'] = []
if puid not in d[dt][cate]['usr']:
d[dt][cate]['usr'].append(puid)
d[dt][cate]['count'] += download_dict[city][puid][dt]
提示错误:
for cate in download_dict[city][puid][dt]:
TypeError: 'long' object is not iterable
请问是什么原因,应该怎么改
展开