Definitely they need nice reprs.
On Tue, Feb 12, 2013 at 1:04 PM, Antoine Pitrou
On Tue, 12 Feb 2013 12:58:44 -0800 Eli Bendersky
wrote: On Tue, Feb 12, 2013 at 11:59 AM, Guido van Rossum
wrote: After all the defenses I still don't like Tim's proposed syntax. Color me Barry.
In this case, I see no reason not to use Barry's flufl.enum - it's pretty good and has been around for a while. The main advantage of Tim's implementation syntax (wasn't it Michael Foord who originally proposed it?) is that it lets us do less typing which is great. IOW, sure with flufl.enum I can do this and be reasonably happy:
class Color(Enum): RED = 1 BLUE = 2 GREEN = 3
I still hope enum values are strings by default - or, if not, that they get nice reprs. Integer enums are only useful for interoperability with stubborn low-level libraries :-)
Regards
Antoine.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org http://mail.python.org/mailman/listinfo/python-ideas
-- --Guido van Rossum (python.org/~guido)