Anders Hovmöller wrote: > I do agree that this is a worthwhile feature-ish, but it's marred by the > tuples-for-values assumption. We've build very much the same thing in > tri.token (https://github.com/TriOptima/tri.token) > but tri.token is much more scalable to many arguments because it uses keyword > arguments > and not positional arguments. > We have "enums" that declare rich static data with more than ten arguments. > This just > doesn't work for positional arguments.
It is only my example of a possible usage of the concept uses uses tuples for values though. The fundamental concept is simply to have a hook that can accept key & value as params and may return a different value. The choice of what kind of values to supply and how to transform them would be the decision of the developer of any particular `Enum`–derived class. _______________________________________________ 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/IYPF2A6KOELCRXI4Y4BQFAUDNXYUZOT3/ Code of Conduct: http://python.org/psf/codeofconduct/