4 ms·
I always thought the fact that Java enums don't have numeric values ended up being a nice idea, but a mistake.. specifically because .ordinal was still exposed,
by famousactress 13y ago
I always thought the fact that Java enums don't have numeric values ended up being a nice idea, but a mistake.. specifically because .ordinal was still exposed, and ends up getting used by people who want to serialize the enum as something other than a string... .ordinal of course is affected by the order the enum is defined in, which is sketchy.
My memory could be a little faded on this though, I haven't coded in Java in a few years..
- iso8859-1 13y agoif you use "None" with this PEP, you'll get the same effect.