[Python-ideas] PEP for enum library type?

Ethan Furman ethan at stoneleaf.us
Fri Feb 22 02:59:00 CET 2013


On 02/21/2013 11:18 AM, Alex Stewart wrote:
> On a related note, to be honest, I'm not really sure I can think of any realistic use cases for "string enums" (or really anything other than ints in general).  Does anybody have an example of where this would actually be useful as opposed to just using "pure" (valueless) enums (which would already have string names)?

The tk library is a good example of where string enums would be useful; they also provide an easy "valueless" entity (at least as far as numbers go).

> I want to check: Is this a valid summary of things?  Anything I missed, or do people have substantial objections to any of the required/desirable/undesirable points I mentioned?

Looks good.

--
~Ethan~



More information about the Python-ideas mailing list