Changeset 1139 for framspy/evolalg/base/union_step.py
- Timestamp:
- 05/08/21 12:42:58 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/evolalg/base/union_step.py
r1113 r1139 5 5 6 6 class UnionStep(Step): 7 def __init__(self, steps): 7 def __init__(self, steps, *args, **kwargs): 8 super(UnionStep, self).__init__(*args, **kwargs) 8 9 if isinstance(steps, Iterable): 9 10 self.steps = steps … … 12 13 13 14 def call(self, population): 15 super(UnionStep, self).call(population) 14 16 for s in self.steps: 15 17 population = s(population) 16 18 return population 19 20 def __len__(self): 21 return len(self.steps) 22 23 def __iter__(self): 24 return iter(self.steps)
Note: See TracChangeset
for help on using the changeset viewer.