From 52adb582dc1adc4b028d72fa1ad616709dc20eac Mon Sep 17 00:00:00 2001 From: jan Date: Sun, 15 Apr 2018 16:14:27 -0700 Subject: [PATCH] copy name when using Pattern.subset() --- masque/pattern.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/masque/pattern.py b/masque/pattern.py index 3256abb..191ba5f 100644 --- a/masque/pattern.py +++ b/masque/pattern.py @@ -87,7 +87,7 @@ class Pattern: :return: A Pattern containing all the shapes and subpatterns for which the parameter functions return True """ - pat = Pattern() + pat = Pattern(name=self.name) if shapes_func is not None: pat.shapes = [s for s in self.shapes if shapes_func(s)] if subpatterns_func is not None: