This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ethan.furman
Recipients SilentGhost, barry, docs@python, eli.bendersky, ethan.furman
Date 2015-11-13.18:18:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1447438704.65.0.0137202045669.issue25594@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for tracking that down.

After more research I'm inclined to leave the code as it is and revamp the docs to clarify that while it may work, the results may not be what you want:

-- 8< -------------------
class Color(Enum):
    red = 1
    blue = 2
    name = 3

print(Color.name)         # Color.name
print(Color.name.blue)    # Color.blue
print(Color.blue.name)    # 'blue'  (not Color.name!)
-- 8< -------------------

Patch attached.
History
Date User Action Args
2015-11-13 18:18:24ethan.furmansetrecipients: + ethan.furman, barry, eli.bendersky, SilentGhost, docs@python
2015-11-13 18:18:24ethan.furmansetmessageid: <1447438704.65.0.0137202045669.issue25594@psf.upfronthosting.co.za>
2015-11-13 18:18:24ethan.furmanlinkissue25594 messages
2015-11-13 18:18:24ethan.furmancreate