rename param for do_subset
This commit is contained in:
parent
6fda991700
commit
4840c321c5
1 changed files with 4 additions and 4 deletions
|
|
@ -90,12 +90,12 @@ class Pattern:
|
||||||
:return: A Pattern containing all the shapes and subpatterns for which the parameter
|
:return: A Pattern containing all the shapes and subpatterns for which the parameter
|
||||||
functions return True
|
functions return True
|
||||||
"""
|
"""
|
||||||
def do_subset(self):
|
def do_subset(src):
|
||||||
pat = Pattern(name=self.name)
|
pat = Pattern(name=src.name)
|
||||||
if shapes_func is not None:
|
if shapes_func is not None:
|
||||||
pat.shapes = [s for s in self.shapes if shapes_func(s)]
|
pat.shapes = [s for s in src.shapes if shapes_func(s)]
|
||||||
if subpatterns_func is not None:
|
if subpatterns_func is not None:
|
||||||
pat.subpatterns = [s for s in self.subpatterns if subpatterns_func(s)]
|
pat.subpatterns = [s for s in src.subpatterns if subpatterns_func(s)]
|
||||||
return pat
|
return pat
|
||||||
|
|
||||||
if recursive:
|
if recursive:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue