[issue25594] enum instance attribute access possible

2015-11-20 Thread Ethan Furman

Ethan Furman added the comment:

Other changeset f4b495ceab17 in default branch.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25594] enum instance attribute access possible

2015-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 276cf69b911e by Ethan Furman in branch '3.5':
Close issue25594: advise against accessing Enum members from other members
https://hg.python.org/cpython/rev/276cf69b911e

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25594] enum instance attribute access possible

2015-11-17 Thread Ethan Furman

Ethan Furman added the comment:

Changed the wording slightly to indicate that looking up members on other 
members is a bad idea.

--
Added file: http://bugs.python.org/file41064/issue25594.stoneleaf.04.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25594] enum instance attribute access possible

2015-11-15 Thread SilentGhost

SilentGhost added the comment:

No further comments re the latest patch.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25594] enum instance attribute access possible

2015-11-15 Thread Ethan Furman

Changes by Ethan Furman :


Added file: http://bugs.python.org/file41048/issue25594.stoneleaf.03.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25594] enum instance attribute access possible

2015-11-13 Thread Ethan Furman

Ethan Furman added the comment:

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.

--
stage: needs patch -> patch review
Added file: http://bugs.python.org/file41030/issue25594.stoneleaf.01.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25594] enum instance attribute access possible

2015-11-10 Thread SilentGhost

Changes by SilentGhost :


--
components:  -Documentation
stage: test needed -> needs patch
title: enum docs outdated re attribute access -> enum instance attribute access 
possible

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com