This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eli.bendersky
Recipients alex, barry, benjamin.peterson, docs@python, dstufft, eli.bendersky, ethan.furman, ezio.melotti, gvanrossum, isoschiz, ncoghlan, pconnell, python-dev, zach.ware
Date 2013-05-26.16:04:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369584260.79.0.902076558686.issue17947@psf.upfronthosting.co.za>
In-reply-to
Content
I tweaked the code a bit (no functionality changes, mostly cleanups and a bit of refactoring). Figured it will be easier to just send an updated patch than another review. The diff from patch 06 can be seen via the Rietveld interface.

Also, after reading the code more carefully, I think we're doing a mistake by over-complicating it for the sake of custom enum metaclasses and over-customization (like auto numbering). The original point Guido raised against auto-numbering was too much magic in the implementation. Well, we already have that in Lib/enum.py - the code is so complex it seems fragile because of the tight coupling with many class and metaclass related protocols. Just defining a wholly new enum implementation that does something very specific seems simpler than customizing the existing one.

I'd suggest we stick to the existing Enum + IntEnum, giving up the more complex customizations for now. It can always be added in the future if we see it's very important.
History
Date User Action Args
2013-05-26 16:04:21eli.benderskysetrecipients: + eli.bendersky, gvanrossum, barry, ncoghlan, benjamin.peterson, ezio.melotti, alex, docs@python, ethan.furman, python-dev, zach.ware, pconnell, dstufft, isoschiz
2013-05-26 16:04:20eli.benderskysetmessageid: <1369584260.79.0.902076558686.issue17947@psf.upfronthosting.co.za>
2013-05-26 16:04:20eli.benderskylinkissue17947 messages
2013-05-26 16:04:20eli.benderskycreate