[Python-Dev] enum instances
Larry Hastings
larry at hastings.org
Wed May 1 04:12:59 CEST 2013
More information about the Python-Dev mailing list
Wed May 1 04:12:59 CEST 2013
- Previous message: [Python-Dev] enum instances
- Next message: [Python-Dev] enum instances
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 04/30/2013 07:05 PM, Nikolaus Rath wrote: > 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. type(EnumMetaClass) == type type(enum) == EnumMetaClass type(EnumMetaClass) != type(enum) //arry/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130430/8b1169f1/attachment.html>
- Previous message: [Python-Dev] enum instances
- Next message: [Python-Dev] enum instances
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list