FAQ
:

On Sun, Sep 22, 2013 at 04:52:36PM -0700, Ethan Furman wrote:
So, as anyone who has worked with Enum is probably aware by now,
Enum's are a strange duck -- you might even call them platypuses.

Yes :-)

What I'm looking for feedback on is the question is #19011: should an
Enum member be considered a class level attribute?

I may be misunderstanding the use case given in the issue, but it seems
to me that having to use


     Color.red.__class__.blue


(what is being complained about in the issue), while not exactly pretty,
makes a lot more semantic sense than


     Color.red.blue


... which is just bizarre.


Enum members aren't class attributes, even if the way they're defined
makes them look as though they are. Allowing this is just asking for
more confusion on the part of anyone using them IMHO.


  -[]z.


--
Zero Piraeus: omnia omnibus
http://etiol.net/pubkey.asc

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 16 | next ›
Discussion Overview
grouppython-dev @
categoriespython
postedSep 22, '13 at 11:52p
activeSep 23, '13 at 11:25p
posts16
users8
websitepython.org

People

Translate

site design / logo © 2022 Grokbase