Skip to content

Can we have a one-line initialisation of ImpactFuncSet? #342

@ChrisFairless

Description

@ChrisFairless

When I create an impact function set from some impact function impf I always do it with

impfset = ImpactFuncSet()
impfset.append(impf)

In the spirit of not initialising empty classes, I'd like to either

  • write an ImpactFuncSet.from_impf method which initialises from a list of impact functions
  • modify ImpactFuncSet.__init__ to take a list of impact functions on initialisation

Is this a good idea? Any preferences?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions