[Python-Dev] Enumeration items: `type(EnumClass.item) is EnumClass` ?

Barry Warsaw barry at python.org
Wed May 1 07:50:14 CEST 2013


On Apr 30, 2013, at 06:00 AM, Steven D'Aprano wrote:

>flufl.enum has been in use for Mailman for many years, and I would like to
>hear Barry's opinion on this.

I'm not sure it matters now (I'm about a billion messages behind with little
hope of catching up), but FWIW, I have use cases for extending through
inheritance and haven't had any kind of semantic confusion.  But then again, I
haven't particularly needed to do type checks or isinstance checks, and I
haven't needed to put methods on enums either.

-Barry


More information about the Python-Dev mailing list