stories
stories copied to clipboard
State union should merge different Argument declarations.
class A1State(State):
a1v1 = Argument()
class A2State(State):
a2v1 = Argument()
NewState = A1State & A2State
The NewState would have both a1v1 and a2v1 arguments declared.
If name was declared as argument at least in one State of the union, it will be allowed to be used as an argument. Even if in other states it was declared as variable.
Having a union of many states could look awful with chosen syntax.
state_class = (
A1State
& A2State
& A3State
& A4State
& A5State
& A6State
& A7State
& A8State
& A9State
& A10State
)
state_class = Union(
A1State,
A2State,
A3State,
A4State,
A5State,
A6State,
A7State,
A8State,
A9State,
A10State,
)
Even more boilerplate could be reduced if we would be able to merge all state subclasses from different namespaces.
state_class = Union(cases.usecases.scopes, bot.usecases.scopes)
Superseded by #722