Re: [Python-Dev] PEP 435 - reference implementation discussion

2013-05-05 Thread Tim Delaney
On 5 May 2013 21:58, Tim Delaney wrote: > On 5 May 2013 16:17, Ethan Furman wrote: > >> On 05/04/2013 10:59 PM, Ethan Furman wrote: >> >>> On 05/04/2013 08:50 PM, Tim Delaney wrote: >>> 2. Instead of directly setting the _name and _value of the enum_item, it lets the Enum class do it v

Re: [Python-Dev] PEP 435 - reference implementation discussion

2013-05-05 Thread Tim Delaney
On 5 May 2013 16:17, Ethan Furman wrote: > On 05/04/2013 10:59 PM, Ethan Furman wrote: > >> On 05/04/2013 08:50 PM, Tim Delaney wrote: >> >>> 2. Instead of directly setting the _name and _value of the enum_item, it >>> lets the Enum class do it via Enum.__init__(). >>> >> Subclasses can override

Re: [Python-Dev] PEP 435 - reference implementation discussion

2013-05-04 Thread Ethan Furman
On 05/04/2013 08:50 PM, Tim Delaney wrote: Think I've come up with a system that works for my auto-numbering case without knowing the internals of enum_type. Patch passes all existing test cases. The patch does two things: 1. Finds the first non-Enum class on the MRO of the new class and uses

Re: [Python-Dev] PEP 435 - reference implementation discussion

2013-05-04 Thread Ethan Furman
On 05/04/2013 10:59 PM, Ethan Furman wrote: On 05/04/2013 08:50 PM, Tim Delaney wrote: Think I've come up with a system that works for my auto-numbering case without knowing the internals of enum_type. Patch passes all existing test cases. The patch does two things: [snip] 2. Instead of d

[Python-Dev] PEP 435 - reference implementation discussion

2013-05-04 Thread Tim Delaney
Split off from the PEP 435 - requesting pronouncement thread. Think I've come up with a system that works for my auto-numbering case without knowing the internals of enum_type. Patch passes all existing test cases. The patch does two things: 1. Finds the first non-Enum class on the MRO of the new