20 Oct
2019
20 Oct
'19
11:16 a.m.
On 20 Oct 2019, at 12:41, Steve Jorgensen <stevej@stevej.name> wrote:
Anders Hovmöller wrote:
We try to do the same thing in various libraries. We've settled on using existing python and end up with syntax like: class MyForm(Form): field = Field() or in your case class Colors(TokenContainer): red = Token() green = Token() blue = Token() (this is using tri.token).
This seems like a good approach and is similar to the strategy Enum uses.
Site note: When we saw enums landing we hoped we could ditch tri.token but unfortunately enums have a bunch of limitations and restrictions that make them quite unusable for our more general use case :(