Ethan Furman added the comment:

Eric, please do not feel your time has been wasted.  I greatly appreciate the 
knowledge you shared and I learned much.

I feel very strongly that, as much as possible, an Enum should Just Work.  
Requiring users to write their own __format__ any time they create a new 
mixinEnum in order to get sane default behaviour is just not cool.

And while the behaviour of switching from str.__format__ to mixin.__format__ 
can appear a bit magical, it is nothing compared to Enum as a whole.

You can review the attached patch to see what I mean about filtering the format 
spec to decide which __format__ method to call.  Any code besides the basic 
width and justification codes will switch to the mix-in's __format__; so '+', 
'b', '%Y', 's', and everything we haven't thought of yet will switch to mix-in.

----------
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file31310/issue18738.stoneleaf.01.patch

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

Reply via email to