There have been a few questions on how to implement enums in Python. Most solutions end up being more or less equivalent to something like this:
class Animal:
DOG=1
CAT=2
Others have suggest more complicated ways of constructing enums, but ultimatly the tend to look like this example when all is said and done.
Based on my experience in Java and C#, I can think of all sorts of uses for such an idiom. However, it doesn't seem to be very Pythonic. In fact, it seems that every time somebody asks why there aren't enums in Python you tend to get a bit of a groan with canned responses about how there is no reason to try and enforce compile time type safety in a language like Python, or how designs which require enums are bad smells in Python.
My question is not how to implement enums in Python, but how in general people approach solutions to problems that lend themselves to enums in a Pythonic way. In other words, how would you solve a problem which lends itself to having a data type with a discrete set of possible values without porting your Java/C# solution to Python.