From c7505a12b0f4ad2614c488487eb8a409a1f307d0 Mon Sep 17 00:00:00 2001 From: jan Date: Fri, 7 Apr 2023 16:55:50 -0700 Subject: [PATCH] should be union; we want to exclude dangling refs --- masque/library.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/masque/library.py b/masque/library.py index c4cb41e..f9411b1 100644 --- a/masque/library.py +++ b/masque/library.py @@ -781,7 +781,7 @@ class MutableLibrary(Library, MutableMapping[str, 'Pattern'], metaclass=ABCMeta) keep |= set(tops) new = type(self)() - for key in keep - set(self.keys()): + for key in keep & set(self.keys()): new._merge(key, self, key) return new