The docs say that enums can be iterated over, but it isn't clear to me whether they are iterated over in definition order or value order.
If I have: class MarxBros(Enum): GROUCHO = 999 CHICO = 5 HARPO = 11 ZEPPO = auto() GUMMO = -1 GROUCHO, CHICO, HARPO, ZEPPO, GUMMO = list(MarxBros) is that guaranteed to do the right thing? i.e. GROUCHO is MarxBros.GROUCHO, and similarly for the other members. On that related note, how would people feel about a method that injects enums into the given namespace? MarxBros._inject_(globals()) although maybe from MarxBros import * would be more familiar syntax :-) -- Steven "Ever since I learned about confirmation bias, I've been seeing it everywhere." - Jon Ronson -- https://mail.python.org/mailman/listinfo/python-list