When and how to subclass Enum vs EnumMeta?

Ethan Furman ethan at stoneleaf.us
Tue May 2 12:34:35 EDT 2017


As more folks start using the Enum data type (introduced in 3.4) there are more questions on how extend them beyond 
"just" a name-value pair.

This question/answer on Stackoverflow:

   http://stackoverflow.com/q/43730305/208880

speaks to the issue of when it is appropriate to subclass EnumMeta, and how to do it*.

--
~Ethan~


* Yes, it is my question/answer.



More information about the Python-list mailing list