
July 25, 2011
5:27 p.m.
On Jul 25, 2011, at 05:27 PM, MRAB wrote:
My nitpick would be that the underlying integer values should start at 0, not 1.
That's only relevant for the make_enum() convenience function. For the class syntax, you pick the values. OT1H, make_enum() is *just* a convenience, so if you really want to start from 0, use the class syntax. OTOH, it would probably be trivial to add an `iter` keyword argument to make_enum() from which it could pull the integer sequence to use. That would be better than adding something like range()'s crazy api. :) -Barry