[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library
barry at python.org
Fri Apr 26 00:02:18 CEST 2013
On Apr 25, 2013, at 02:54 PM, Guido van Rossum wrote:
>I don't know what's going on,
Mostly that this is my first opportunity to chime in on the subject.
>but it feels like we had this same discussion a week ago, and I still
>disagree. Disregarding, the C[i] notation, I feel quite strongly that in the
> red = 1
> white = 2
> blue = 3
> orange = 4
>the values Color.red etc. should be instances of Color. This is how
>things work in all other languages that I am aware of that let you
Is it enough that isinstance(Color.red, Color) returns True, or do you
really-and-truly want them to be instances of Color?
I still think it's weird, but I could accept the former if you're flexible on
the latter, which in some sense is just an implementation detail anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: not available
More information about the Python-Dev