Best way to implement "enum" like python, c, java?

Elegant solution.
The only one caveat is that since the numbers are not unique you will get a warning saying a previous clause always matches