Hacker News new | ask | show | jobs
by stevek 5220 days ago
Does nobody else find the repetition objectionable? e.g. NEW = ('N', 'New'), If your values have good names, you can easily deduce "Some Constant" from SOME_CONSTANT or vice-versa. While I'm at it, having abbreviations built-in seems iffy too.
1 comments

The apparent repetition is due to the triviality of the example. Imagine if you had to translate the display string or change the display name without renaming all of your code references to the constant.