The idea of adding something-like-enum to the language is under discussion right now on the python-ideas list "constant/enum type in stdlib", with multiple designs and pure-Python implementations being tossed around and picked over. In the previous round of discussion, Guido and almost everyone else agreed something was worth adding, but nobody ever decided what to add.
So, I think you could say that the idiomatic way to do enum constants hasn't actually been invented yet.
It's worth skimming that thread to get a sense of what's considered idiomatic, and what the obvious way to do it is if you're Dutch, and so on. And if you do want to use enums, it's even more worth skimming before choosing an implementation.
Meanwhile, if you want to know what's idiomatic in the distant past of, say, February 2013, I'd agree with Dietrich Epp that strings are almost always the right choice for problems of this type.
He explains why the performance issues aren't an issue in Python, but there's one more thing people always bring up that I want to dismiss:
thingy = 'mokney'
# ...
if thingy == 'gorilla': do_gorilla()
elif thingy == 'monkey': do_monkey()
else: do_default()
If you used some kind of strict enum, this couldn't happen—or, at least, you could protect against it by putting an assert isinstance(thingy, Primate)
before the if
/elif
chain.
Which all sounds great, until you look at this line:
thigny == 'monkey'