On 04/30/2013 07:05 PM, Nikolaus Rath wrote:
> Larry Hastings writes:
>> On 04/29/2013 07:42 PM, Nikolaus Rath wrote:
>>> State is a class, it just inherits from enum. Thus:
>>>
>>> type(State) == type(enum) == type(EnumMetaclass)
>>> issubclass(State, enum) == True
>>>
>>
>> If you'd tried it, yo
On 04/30/2013 07:05 PM, Nikolaus Rath wrote:
Larry Hastings writes:
On 04/29/2013 07:42 PM, Nikolaus Rath wrote:
State is a class, it just inherits from enum. Thus:
type(State) == type(enum) == type(EnumMetaclass)
issubclass(State, enum) == True
HTH,
-Nikolaus
If you'd tried it, you
On 04/30/2013 07:05 PM, Nikolaus Rath wrote:
Larry Hastings writes:
On 04/29/2013 07:42 PM, Nikolaus Rath wrote:
State is a class, it just inherits from enum. Thus:
type(State) == type(enum) == type(EnumMetaclass)
issubclass(State, enum) == True
HTH,
-Nikolaus
If you'd tried it, you'
Larry Hastings writes:
> On 04/29/2013 07:42 PM, Nikolaus Rath wrote:
>> State is a class, it just inherits from enum. Thus:
>>
>> type(State) == type(enum) == type(EnumMetaclass)
>> issubclass(State, enum) == True
>>
>>
>> HTH,
>>
>> -Nikolaus
>
> If you'd tried it, you'd have found that that
On 04/29/2013 07:42 PM, Nikolaus Rath wrote:
State is a class, it just inherits from enum. Thus:
type(State) == type(enum) == type(EnumMetaclass)
issubclass(State, enum) == True
HTH,
-Nikolaus
If you'd tried it, you'd have found that that isn't true. enum has a
metaclass, EnumMetaclas
Marco Hemmelrath writes:
> class State(enum):
> idle = 0
> busy = 1
> idling = idle
> ideling = 0
>
> together with the premises:
>
> 1. type(State.busy) == State
> 2. type(State) == enum
State is a class, it just inherits from enum. Thus:
type(State)
On 04/29/2013 06:23 PM, Marco Hemmelrath wrote:
First of all, hi, I'm new to this list.
Following the enum discussions on this list I am kind of confused about how
enums and their respective instances, i.e.
the values, should behave in "normal" context.
I apologize beforehand for the mass of "q
First of all, hi, I'm new to this list.
Following the enum discussions on this list I am kind of confused about
how enums and their respective instances, i.e. the values, should behave
in "normal" context.
I apologize beforehand for the mass of "questions" because the following
contains really