Skip to content

StateVars ext_id should have a smart default (== name)

the variable StateVar.ext_id is used to adress Nodes by Node.name

In most cases, StateVar.ext_id is identical to StateVar.name. So why not set ext_id to name's value at initialization?

This reduces boilerplate drastically, as well as eliminates the name confusion (StateVar.ext_id <> Node.name).

Side effects may arise...

possible solution:

def __post_init__(self):
    if self.ext_id is None:
        self.ext_id = self.name
Edited by A.Clement