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. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/UFMKE6PNF2UBFMES6PWQWNVMA6PFERG6/ Code of Conduct: http://python.org/psf/codeofconduct/