Message254610
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. |
|
Date |
User |
Action |
Args |
2015-11-13 18:18:24 | ethan.furman | set | recipients:
+ ethan.furman, barry, eli.bendersky, SilentGhost, docs@python |
2015-11-13 18:18:24 | ethan.furman | set | messageid: <1447438704.65.0.0137202045669.issue25594@psf.upfronthosting.co.za> |
2015-11-13 18:18:24 | ethan.furman | link | issue25594 messages |
2015-11-13 18:18:24 | ethan.furman | create | |
|