Eli Bendersky added the comment:

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.

----------
Added file: http://bugs.python.org/file30384/pep-0435.07.eliben.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17947>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to