X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Fgen-threads.py;h=70fb1f687237fb832cb5ac8d33ea151aafb18cd8;hp=9fbb8474ab7dd58769c6d91afd19e3790efcbf28;hb=ad60e5d4e8a6736af28f326803dbd38620e71ae8;hpb=c2bbe9eb6c46b2f1723ce6c5e26816dd82e42c6f diff --git a/test/gen-threads.py b/test/gen-threads.py index 9fbb8474..70fb1f68 100644 --- a/test/gen-threads.py +++ b/test/gen-threads.py @@ -2,7 +2,6 @@ # argv[1]. Each output line is a thread structure, where the n'th # field is either a number giving the parent of message n or "None" # for the root. - import sys from itertools import chain, combinations @@ -28,6 +27,7 @@ while queue: else: # Expand node to_expand[0] with each possible set of children for children in subsets(free): - ntree = dict(tree, **{child: to_expand[0] for child in children}) + ntree = {child: to_expand[0] for child in children} + ntree.update(tree) nfree = free.difference(children) queue.append((ntree, nfree, to_expand[1:] + tuple(children)))