Skip to content

Commit e53537c

Browse files
committed
Use defaultdict in the other place
1 parent 982d208 commit e53537c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/memap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ def reduce_depth(self, depth):
508508
if split_name[0] == '':
509509
split_name = split_name[1:]
510510
new_name = join(*split_name[:depth])
511-
self.short_modules.setdefault(new_name, {})
511+
self.short_modules.setdefault(new_name, defaultdict(int))
512512
for section_idx, value in v.items():
513513
self.short_modules[new_name].setdefault(section_idx, 0)
514514
self.short_modules[new_name][section_idx] += self.modules[module_name][section_idx]

0 commit comments

Comments
 (0)