On 7/7/22 09:01, Steve Jorgensen wrote:
> Actually, maybe these are fundamentally incompatible?
Their intended use seems fundamentally incompatible:
- dataclass was designed for making many mutable records (hundreds, thousands,
or more)
- enum was designed to make a handful of named constants (I haven't yet seen
one with even a hundred elements)
The repr from a combined dataclass/enum looks like a dataclass, giving no clue that the object is an enum, and omitting
any information about which enum member it is and which enum it is from.
Given these conflicts of interest, I don't see any dataclass examples making it
into the enum documentation.
--
~Ethan~
_______________________________________________
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/6CIPPTP2Z42GVUIVOUXZ7BW46DB5HWEZ/
Code of Conduct: http://python.org/psf/codeofconduct/