[Python-Dev] enum instances (original) (raw)
Nikolaus Rath Nikolaus at rath.org
Wed May 1 04:05:04 CEST 2013
- Previous message: [Python-Dev] Enumeration items: mixed types?
- Next message: [Python-Dev] enum instances
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Larry Hastings <larry at hastings.org> 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 isn't true. enum has a metaclass, EnumMetaclass. Thus type(enum) == EnumMetaClass.
That is exactly what I wrote above.
That didn't help,
Aeh, yes.
Best,
-Nikolaus
-- »Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
- Previous message: [Python-Dev] Enumeration items: mixed types?
- Next message: [Python-Dev] enum instances
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]