News for hackers. Stuff that matters.
Re:Python Enums for Humans by jaspersfather on Monday February 27, 2012 @09:20AM (#3639030)
What makes that better than just using strings?
Re:Python Enums for Humans by wuster on Monday February 27, 2012 @03:54PM (#3640600)
[ Edit: add more context ]

My use case for this is to map between the database and application logic.

In the example, the short string 'N' is for storage in a db column, *.NEW is for use in code, and "New" is for use to display in an UI. You don't necessarily want to persist the display or var name because you may want to rename them in the app later. IMO it's a bad idea to store display representations as data.